learning how to test
This commit is contained in:
@@ -17,12 +17,10 @@
|
||||
checkError (ev) {
|
||||
const newValue = ev.target.value;
|
||||
this.has_error = isNaN(newValue);
|
||||
if (!this.has_error) {
|
||||
this.$emit(
|
||||
'input',
|
||||
Number(newValue)
|
||||
);
|
||||
}
|
||||
this.$emit(
|
||||
'input',
|
||||
this.has_error ? 0 : Number(newValue)
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user