diff --git a/src/components/inputmask/InputMask.vue b/src/components/inputmask/InputMask.vue index ebbb795f5..896cc5638 100755 --- a/src/components/inputmask/InputMask.vue +++ b/src/components/inputmask/InputMask.vue @@ -392,11 +392,11 @@ export default { let val = this.unmask ? this.getUnmaskedValue() : e.target.value; this.$emit('update:modelValue', (this.defaultBuffer !== val) ? val : ''); }, - updateValue() { + updateValue(updateModel = true) { if (this.$el) { if (this.modelValue == null) { this.$el.value = ''; - this.$emit('update:modelValue', ''); + updateModel && this.$emit('update:modelValue', ''); } else { this.$el.value = this.modelValue; @@ -407,8 +407,10 @@ export default { this.writeBuffer(); this.checkVal(); - let val = this.unmask ? this.getUnmaskedValue() : this.$el.value; - this.$emit('update:modelValue', (this.defaultBuffer !== val) ? val : ''); + if (updateModel) { + let val = this.unmask ? this.getUnmaskedValue() : this.$el.value; + this.$emit('update:modelValue', (this.defaultBuffer !== val) ? val : ''); + } } }, 10); } @@ -468,7 +470,7 @@ export default { } } this.defaultBuffer = this.buffer.join(''); - this.updateValue(); + this.updateValue(false); }, updated() { if (this.isValueUpdated()) {