Update input-number.vue

This commit is contained in:
Aresn 2018-05-24 10:21:53 +08:00 committed by GitHub
parent 4d093b5070
commit 10b42e26d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,11 +248,8 @@
}, },
setValue (val) { setValue (val) {
// step precision // step precision
if(val){ if (val && !isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
if (!isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
}
this.$nextTick(() => { this.$nextTick(() => {
this.currentValue = val; this.currentValue = val;
this.$emit('input', val); this.$emit('input', val);