diff --git a/src/field/index.js b/src/field/index.js index a1da6f4a9..8621c7206 100644 --- a/src/field/index.js +++ b/src/field/index.js @@ -63,11 +63,8 @@ export default createComponent({ watch: { value() { + this.resetValidate(); this.$nextTick(this.adjustSize); - - if (this.validateMessage) { - this.validateMessage = ''; - } }, }, @@ -154,6 +151,12 @@ export default createComponent({ }); }, + resetValidate() { + if (this.validateMessage) { + this.validateMessage = ''; + } + }, + format(target = this.$refs.input) { if (!target) { return; diff --git a/src/mixins/field.js b/src/mixins/field.js index bf55f9682..ab1f1399a 100644 --- a/src/mixins/field.js +++ b/src/mixins/field.js @@ -5,6 +5,14 @@ export const FieldMixin = { }, }, + watch: { + value() { + if (this.vanField) { + this.vanField.resetValidate(); + } + }, + }, + created() { if (this.vanField) { this.vanField.children = this;