pull/64/merge
凌子清 2017-09-22 03:15:38 +00:00 committed by GitHub
commit d6c090a1b1
2 changed files with 237 additions and 223 deletions

2
dist/laydate.js vendored

File diff suppressed because one or more lines are too long

View File

@ -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')
});
};