fix(Form): incorrect validation order when add field dynamically

This commit is contained in:
chenjiahan
2020-04-01 21:39:08 +08:00
committed by neverland
parent 02e67fdd47
commit b8dea3c13b
5 changed files with 79 additions and 24 deletions
+2 -2
View File
@@ -80,13 +80,13 @@ export default createComponent({
this.$nextTick(this.adjustSize);
if (this.vanForm) {
this.vanForm.fields.push(this);
this.vanForm.addField(this);
}
},
beforeDestroy() {
if (this.vanForm) {
this.vanForm.fields = this.vanForm.fields.filter(item => item !== this);
this.vanForm.removeField(this);
}
},