ltsecurityinc安防产品在线商城代码
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<script src="Nwdthemes_Base::js/jscolor.min.js"/>
|
||||
</head>
|
||||
</page>
|
||||
@@ -0,0 +1,10 @@
|
||||
var config = {
|
||||
paths: {
|
||||
jscolor: 'Nwdthemes_Base/js/jscolor.min'
|
||||
},
|
||||
shim: {
|
||||
jscolor: {
|
||||
exports: 'jscolor'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright © 2016 Magento. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
define([
|
||||
'jquery',
|
||||
'Magento_Ui/js/form/element/abstract',
|
||||
'jscolor'
|
||||
],
|
||||
function($, Abstract) {
|
||||
return Abstract.extend({
|
||||
defaults: {
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes component, invokes initialize method of Abstract class.
|
||||
*
|
||||
* @returns {Object} Chainable.
|
||||
*/
|
||||
initialize: function () {
|
||||
this._super();
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handler function which is supposed to be invoked when
|
||||
* input element has been rendered.
|
||||
*
|
||||
* @param {HTMLInputElement} input
|
||||
*/
|
||||
onElementRender: function (input) {
|
||||
$(input).width(100);
|
||||
new jscolor(input, {hash: true, uppercase: true});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
+10
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
|
||||
<input class="admin__control-text" type="text"
|
||||
afterRender="onElementRender"
|
||||
data-bind="
|
||||
event: {change: userChanges},
|
||||
value: value,
|
||||
hasFocus: focused,
|
||||
valueUpdate: valueUpdate,
|
||||
attr: {
|
||||
name: inputName,
|
||||
placeholder: placeholder,
|
||||
'aria-describedby': noticeId,
|
||||
id: uid,
|
||||
disabled: disabled
|
||||
}"/>
|
||||
Reference in New Issue
Block a user