From f35cfe05a147562d76cd1b2c4da74c5f194f058b Mon Sep 17 00:00:00 2001 From: dolymood Date: Tue, 20 Aug 2019 17:13:17 +0800 Subject: [PATCH] fix(form): should sync validity when add item field --- src/components/form/form.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/form/form.vue b/src/components/form/form.vue index 57c2bd3f..daceec2f 100644 --- a/src/components/form/form.vue +++ b/src/components/form/form.vue @@ -124,6 +124,7 @@ dispatchEvent(this.$refs.form, 'reset') }, submitHandler(e) { + debugger // sync all fields value because of trigger: blur or debounce this.syncValidatorValues() if (this.skipValidate) { @@ -288,6 +289,7 @@ }, addField(fieldComponent) { this.fields.push(fieldComponent) + this.setValidity(fieldComponent.fieldValue.modelKey) }, destroyField(fieldComponent) { const i = this.fields.indexOf(fieldComponent) -- GitLab