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; this.focusText = this.$el.value;
} }
},
isValueUpdated() {
return this.unmask ?
(this.modelValue != this.getUnmaskedValue()) :
(this.defaultBuffer !== this.$el.value && this.$el.value !== this.modelValue);
} }
}, },
mounted() { mounted() {
@ -464,12 +469,10 @@ export default {
this.defaultBuffer = this.buffer.join(''); this.defaultBuffer = this.buffer.join('');
this.updateValue(); this.updateValue();
}, },
watch: { updated() {
value(newValue, oldValue) { if (this.isValueUpdated()) {
if (oldValue && oldValue !== newValue && this.$el.value !== newValue) {
this.updateValue(); this.updateValue();
} }
}
}, },
computed: { computed: {
filled() { filled() {