Merge pull request #4072 from funnycoderstar/2.0

fix: #4048
This commit is contained in:
Aresn 2018-08-09 16:13:23 +08:00 committed by GitHub
commit ea7bcb7acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,7 +246,7 @@
},
handleInput (event) {
let value = event.target.value;
if (this.number) value = Number.isNaN(Number(value)) ? value : Number(value);
if (this.number && value !== '') value = Number.isNaN(Number(value)) ? value : Number(value);
this.$emit('input', value);
this.setCurrentValue(value);
this.$emit('on-change', event);