InputNumber support null values
This commit is contained in:
parent
14b7409b78
commit
10d29acb97
2 changed files with 11 additions and 1 deletions
|
@ -178,7 +178,7 @@
|
|||
return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
|
||||
},
|
||||
formatterValue () {
|
||||
if (this.formatter) {
|
||||
if (this.formatter && this.precisionValue !== null) {
|
||||
return this.formatter(this.precisionValue);
|
||||
} else {
|
||||
return this.precisionValue;
|
||||
|
@ -279,6 +279,10 @@
|
|||
const isEmptyString = val.length === 0;
|
||||
val = Number(val);
|
||||
|
||||
if(isEmptyString){
|
||||
this.setValue(null);
|
||||
return;
|
||||
}
|
||||
if (event.type == 'change'){
|
||||
if (val === this.currentValue && val > min && val < max) return; // already fired change for input event
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue