pull/726/head
mertsincan 2020-11-27 21:51:49 +03:00
parent 8b9f25ba5d
commit ae7a54dd78
1 changed files with 8 additions and 5 deletions

View File

@ -414,6 +414,11 @@ export default {
this.focusText = this.$el.value;
}
},
isValueUpdated() {
return this.unmask ?
(this.modelValue != this.getUnmaskedValue()) :
(this.defaultBuffer !== this.$el.value && this.$el.value !== this.modelValue);
}
},
mounted() {
@ -464,11 +469,9 @@ export default {
this.defaultBuffer = this.buffer.join('');
this.updateValue();
},
watch: {
value(newValue, oldValue) {
if (oldValue && oldValue !== newValue && this.$el.value !== newValue) {
this.updateValue();
}
updated() {
if (this.isValueUpdated()) {
this.updateValue();
}
},
computed: {