fix: form change value not trigger validate #4955

close $4955
pull/4956/head
tangjinzhou 2021-11-30 22:23:44 +08:00
parent af54405381
commit 79ae8006a8
1 changed files with 9 additions and 3 deletions

View File

@ -285,6 +285,12 @@ export default defineComponent({
resetField,
});
// instead useProvideFormItemContext onFieldChange
watch(fieldValue, () => {
if (props.autoLink) {
onFieldChange();
}
});
useProvideFormItemContext(
{
id: fieldId,
@ -294,9 +300,9 @@ export default defineComponent({
}
},
onFieldChange: () => {
if (props.autoLink) {
onFieldChange();
}
// if (props.autoLink) {
// onFieldChange();
// }
},
clearValidate,
},