From 7c41c8673c2fd5f2cf946a3ae84d8688578f9754 Mon Sep 17 00:00:00 2001 From: Vben Date: Mon, 26 Apr 2021 20:59:41 +0800 Subject: [PATCH] fix(form): expose formModel,fix #533 --- src/components/Form/src/hooks/useFormEvents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form/src/hooks/useFormEvents.ts b/src/components/Form/src/hooks/useFormEvents.ts index 0045dfc4..dce432f8 100644 --- a/src/components/Form/src/hooks/useFormEvents.ts +++ b/src/components/Form/src/hooks/useFormEvents.ts @@ -76,7 +76,7 @@ export function useFormEvents({ const { componentProps } = schema || {}; let _props = componentProps as any; if (typeof componentProps === 'function') { - _props = _props(); + _props = _props({ formModel }); } formModel[key] = value ? (_props?.valueFormat ? value : dateUtil(value)) : null; }