Refactor #714
parent
8b9f25ba5d
commit
ae7a54dd78
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue