diff --git a/src/components/inputmask/InputMask.vue b/src/components/inputmask/InputMask.vue index 640c203b5..e1c5072bb 100755 --- a/src/components/inputmask/InputMask.vue +++ b/src/components/inputmask/InputMask.vue @@ -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: {