Skip to content

Commit f0cf278

Browse files
committed
fix 动态移除组件validate还存在的问题
1 parent 70a08fd commit f0cf278

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/form/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ function getFormItemComponent(that) {
351351
componentWillUnmount() {
352352
const name = this.name;
353353
that.off('form-set-field-value-' + name);
354+
//删除unmount组件的validate
355+
delete that.fieldsValidate[name];
354356
this.triggerFormValue(name);
355357
this.triggerFormError(name);
356358
}

0 commit comments

Comments
 (0)