Fixed #1337 - input mask - mask affecting dirty state
parent
a1cf1d4277
commit
023d7794ad
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue