From ed9571842a1a750c6e2ea3d47d00017177edd910 Mon Sep 17 00:00:00 2001 From: shizhongming Date: Wed, 8 May 2024 14:04:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(Form=E7=BB=84=E4=BB=B6):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dform=E7=BB=84=E4=BB=B6setFieldsValue=EF=BC=8CsetFields?= =?UTF-8?q?Value({date:=20dayjs()=20})=20=E4=BC=9A=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 ec9b694ad..ed4bb5334 100644 --- a/src/components/Form/src/hooks/useFormEvents.ts +++ b/src/components/Form/src/hooks/useFormEvents.ts @@ -90,7 +90,7 @@ export function useFormEvents({ // 0| '' is allow if (hasKey || !!constructValue) { - const fieldValue = constructValue || value; + const fieldValue = constructValue && !isFunction(constructValue) ? constructValue : value; // time type if (itemIsDateType(key)) { if (Array.isArray(fieldValue)) {