fixed Input bug
when use input prop in Input, it can not correctly to emit a Number value
This commit is contained in:
parent
bf9649f6e8
commit
85ed4df8fc
1 changed files with 2 additions and 1 deletions
|
@ -157,7 +157,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleInput (event) {
|
handleInput (event) {
|
||||||
const value = event.target.value;
|
let value = event.target.value;
|
||||||
|
if (this.number) value = Number.isNaN(Number(value)) ? value : Number(value);
|
||||||
this.$emit('input', value);
|
this.$emit('input', value);
|
||||||
this.setCurrentValue(value);
|
this.setCurrentValue(value);
|
||||||
this.$emit('on-change', event);
|
this.$emit('on-change', event);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue