From 19931fb273864952cb652d169e30af96ec6dd30e Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Wed, 7 Dec 2022 16:19:50 +0800 Subject: [PATCH] =?UTF-8?q?useForm=E7=9A=84getFieldsValue=E5=B0=86?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=BD=AC=E6=88=90=E5=AD=97=E7=AC=A6=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=97=A0=E6=B3=95=E8=AF=BB=E5=8F=96=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20#4330?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/hooks/useForm.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Form/src/hooks/useForm.ts b/src/components/Form/src/hooks/useForm.ts index a4d6f8c..fd5885f 100644 --- a/src/components/Form/src/hooks/useForm.ts +++ b/src/components/Form/src/hooks/useForm.ts @@ -97,7 +97,12 @@ export function useForm(props?: Props): UseFormReturnType { if(values){ Object.keys(values).map(key=>{ if (values[key] instanceof Array) { - values[key] = values[key].join(','); + // update-begin-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组,则不拼接 + let isObject = typeof (values[key][0] || '') === 'object'; + if (!isObject) { + values[key] = values[key].join(','); + } + // update-end-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组,则不拼接 } }); }