chore: improve watcher

This commit is contained in:
陈嘉涵
2020-01-18 10:58:12 +08:00
parent f928063d6a
commit c895bf1739
6 changed files with 14 additions and 16 deletions

View File

@@ -112,17 +112,17 @@ export default createComponent({
},
watch: {
max: 'check',
min: 'check',
integer: 'check',
decimalLength: 'check',
value(val) {
if (!equal(val, this.currentValue)) {
this.currentValue = this.format(val);
}
},
max: 'check',
min: 'check',
integer: 'check',
decimalLength: 'check',
currentValue(val) {
this.$emit('input', val);
this.$emit('change', val, { name: this.name });