Merge 4617e18613
into 898ec1d05d
commit
d6c090a1b1
File diff suppressed because one or more lines are too long
|
@ -10,6 +10,18 @@
|
|||
;!function(){
|
||||
"use strict";
|
||||
|
||||
function eventDispatcher(e, eventName) {
|
||||
try {
|
||||
var ev = document.createEvent('HTMLEvents');
|
||||
ev.initEvent(eventName, true, true);
|
||||
} catch (err) {}
|
||||
if (e.fireEvent) {
|
||||
e.fireEvent('on' + eventName);
|
||||
} else {
|
||||
e.dispatchEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
var isLayui = window.layui && layui.define, ready = {
|
||||
getPath: function(){
|
||||
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
|
||||
|
@ -312,6 +324,8 @@
|
|||
LAY.prototype.val = function(value){
|
||||
return this.each(function(index, item){
|
||||
item.value = value;
|
||||
eventDispatcher(item, 'change')
|
||||
eventDispatcher(item, 'blur')
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue