Commit 7d9a220f authored by hbcui1984's avatar hbcui1984

修复数字输入框,触发顶层容器的change事件

parent d7cadb5a
...@@ -7027,8 +7027,13 @@ Function.prototype.bind = Function.prototype.bind || function(to) { ...@@ -7027,8 +7027,13 @@ Function.prototype.bind = Function.prototype.bind || function(to) {
self.input.value = val.toString(); self.input.value = val.toString();
$.trigger(self.input, changeEventName, null); $.trigger(self.input, changeEventName, null);
}); });
self.input.addEventListener(changeEventName, function(event) { self.input.addEventListener(changeEventName, function(event) {
self.checkValue(); self.checkValue();
var val = parseInt(self.input.value);
//触发顶层容器
$.trigger(self.holder, changeEventName, {
value: val
});
}); });
}, },
/** /**
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7027,8 +7027,13 @@ Function.prototype.bind = Function.prototype.bind || function(to) { ...@@ -7027,8 +7027,13 @@ Function.prototype.bind = Function.prototype.bind || function(to) {
self.input.value = val.toString(); self.input.value = val.toString();
$.trigger(self.input, changeEventName, null); $.trigger(self.input, changeEventName, null);
}); });
self.input.addEventListener(changeEventName, function(event) { self.input.addEventListener(changeEventName, function(event) {
self.checkValue(); self.checkValue();
var val = parseInt(self.input.value);
//触发顶层容器
$.trigger(self.holder, changeEventName, {
value: val
});
}); });
}, },
/** /**
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -49,8 +49,13 @@ ...@@ -49,8 +49,13 @@
self.input.value = val.toString(); self.input.value = val.toString();
$.trigger(self.input, changeEventName, null); $.trigger(self.input, changeEventName, null);
}); });
self.input.addEventListener(changeEventName, function(event) { self.input.addEventListener(changeEventName, function(event) {
self.checkValue(); self.checkValue();
var val = parseInt(self.input.value);
//触发顶层容器
$.trigger(self.holder, changeEventName, {
value: val
});
}); });
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment