提交 30970b34 编写于 作者: D dolymood

fix(form): should sync validity when add item field

上级 9e071c2d
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
dispatchEvent(this.$refs.form, 'reset') dispatchEvent(this.$refs.form, 'reset')
}, },
submitHandler(e) { submitHandler(e) {
debugger
// sync all fields value because of trigger: blur or debounce // sync all fields value because of trigger: blur or debounce
this.syncValidatorValues() this.syncValidatorValues()
if (this.skipValidate) { if (this.skipValidate) {
...@@ -288,6 +289,7 @@ ...@@ -288,6 +289,7 @@
}, },
addField(fieldComponent) { addField(fieldComponent) {
this.fields.push(fieldComponent) this.fields.push(fieldComponent)
this.setValidity(fieldComponent.fieldValue.modelKey)
}, },
destroyField(fieldComponent) { destroyField(fieldComponent) {
const i = this.fields.indexOf(fieldComponent) const i = this.fields.indexOf(fieldComponent)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册