From 5480167827599fa430753e5b7d9afecb7c4cec5e Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 4 Aug 2023 10:58:53 +0800 Subject: [PATCH] fix: linkagerule copy data mutual influence (#2333) --- .../schema-settings/LinkageRules/components/LinkageHeader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-settings/LinkageRules/components/LinkageHeader.tsx b/packages/core/client/src/schema-settings/LinkageRules/components/LinkageHeader.tsx index 3377302f2..75d81a41e 100644 --- a/packages/core/client/src/schema-settings/LinkageRules/components/LinkageHeader.tsx +++ b/packages/core/client/src/schema-settings/LinkageRules/components/LinkageHeader.tsx @@ -5,7 +5,7 @@ import { ISchema, RecursionField, observer, useField, useFieldSchema } from '@fo import { toArr } from '@formily/shared'; import { Badge, Card, Collapse, CollapsePanelProps, CollapseProps, Empty, Input } from 'antd'; import cls from 'classnames'; -import { clone } from 'lodash'; +import { cloneDeep } from 'lodash'; import React, { Fragment, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useToken } from '../../../style'; @@ -257,7 +257,7 @@ ArrayCollapse.Copy = React.forwardRef((props: any, ref) => { if (self?.disabled) return; e.stopPropagation(); if (array.props?.disabled) return; - const value = clone(array?.field?.value[index]); + const value = cloneDeep(array?.field?.value[index]); array.field.push(value); if (props.onClick) { props.onClick(e);