From ebc08bf49248156788448cbf94754c67d5ee1ba0 Mon Sep 17 00:00:00 2001 From: SANmq <50514663+SANmq@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:23:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(list):=20=E4=BF=AE=E5=A4=8DProFormList?= =?UTF-8?q?=E9=80=8F=E4=BC=A0=E9=83=A8=E5=88=86=E5=B1=9E=E6=80=A7=E5=88=B0?= =?UTF-8?q?FormItem=E4=B8=AD=E5=AF=BC=E8=87=B4=E7=9A=84react=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=20(#8051)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 具体属性为containerClassName、containerStyle、readonly。解决方案是将其从props中解构出来并调整对应使用的地方 --- packages/form/src/components/List/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/form/src/components/List/index.tsx b/packages/form/src/components/List/index.tsx index c6ef1389a6c5..d3b6a97b2f8d 100644 --- a/packages/form/src/components/List/index.tsx +++ b/packages/form/src/components/List/index.tsx @@ -160,6 +160,9 @@ function ProFormList(props: ProFormListProps) { isValidateList = false, emptyListMessage = '列表不能为空', className, + containerClassName, + containerStyle, + readonly, ...rest } = props; @@ -244,7 +247,7 @@ function ProFormList(props: ProFormListProps) { (props: ProFormListProps) { } onAfterRemove?.(index, count); }} - containerClassName={props.containerClassName} - containerStyle={props.containerStyle} + containerClassName={containerClassName} + containerStyle={containerStyle} > {children}