input-number:fix user input parsing when inputing

pull/20259/head
wanghongye 2020-10-03 18:52:08 +08:00
parent 649670c55a
commit 0f86321f64
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@
this.currentValue = newVal; this.currentValue = newVal;
}, },
handleInput(value) { handleInput(value) {
this.userInput = value; this.userInput = value.replace(/[^\d|.]/g, '');
}, },
handleInputChange(value) { handleInputChange(value) {
const newVal = value === '' ? undefined : Number(value); const newVal = value === '' ? undefined : Number(value);