Browse Source

fix: form change value not trigger validate #4955

close $4955
pull/4956/head
tangjinzhou 3 years ago
parent
commit
79ae8006a8
  1. 12
      components/form/FormItem.tsx

12
components/form/FormItem.tsx

@ -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,
},

Loading…
Cancel
Save