From e1ba3c127daf142706590ad5914e50e5cb100c65 Mon Sep 17 00:00:00 2001 From: qixian Date: Thu, 26 Sep 2024 18:10:02 +0800 Subject: [PATCH] refactor: replace lodash.merge with lodash-es.merge in multiple files --- packages/form/src/layouts/DrawerForm/index.tsx | 2 +- packages/form/src/layouts/ModalForm/index.tsx | 2 +- packages/table/src/Store/Provide.tsx | 2 +- packages/utils/src/transformKeySubmitValue/index.ts | 1 - vitest.config.ts | 2 ++ 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/form/src/layouts/DrawerForm/index.tsx b/packages/form/src/layouts/DrawerForm/index.tsx index b9abf4f3a33b..b4da36cfb004 100644 --- a/packages/form/src/layouts/DrawerForm/index.tsx +++ b/packages/form/src/layouts/DrawerForm/index.tsx @@ -6,7 +6,7 @@ import type { DrawerProps, FormProps } from 'antd'; import { ConfigProvider, Drawer } from 'antd'; import classNames from 'classnames'; -import merge from 'lodash.merge'; +import { merge } from 'lodash-es'; import useMergedState from 'rc-util/es/hooks/useMergedState'; import { noteOnce } from 'rc-util/es/warning'; import React, { diff --git a/packages/form/src/layouts/ModalForm/index.tsx b/packages/form/src/layouts/ModalForm/index.tsx index 8d4027d068d2..df7c35695620 100644 --- a/packages/form/src/layouts/ModalForm/index.tsx +++ b/packages/form/src/layouts/ModalForm/index.tsx @@ -1,6 +1,6 @@ import type { FormProps, ModalProps } from 'antd'; import { ConfigProvider, Modal } from 'antd'; -import merge from 'lodash.merge'; +import { merge } from 'lodash-es'; import useMergedState from 'rc-util/es/hooks/useMergedState'; import { noteOnce } from 'rc-util/es/warning'; import React, { diff --git a/packages/table/src/Store/Provide.tsx b/packages/table/src/Store/Provide.tsx index d03d9b6315fa..c638fc2ebf64 100644 --- a/packages/table/src/Store/Provide.tsx +++ b/packages/table/src/Store/Provide.tsx @@ -1,5 +1,5 @@ import type { TableColumnType } from 'antd'; -import merge from 'lodash.merge'; +import { merge } from 'lodash-es'; import useMergedState from 'rc-util/es/hooks/useMergedState'; import { noteOnce } from 'rc-util/es/warning'; import { diff --git a/packages/utils/src/transformKeySubmitValue/index.ts b/packages/utils/src/transformKeySubmitValue/index.ts index 9e5d90560afb..e8826fbcaddc 100644 --- a/packages/utils/src/transformKeySubmitValue/index.ts +++ b/packages/utils/src/transformKeySubmitValue/index.ts @@ -170,7 +170,6 @@ const loopRunTransform = >( dataFormatMap, key as (number | string)[], ) as SearchTransformKeyFn; - ``; if (transformFunction && typeof transformFunction === 'function') { finalValues = mergeValues( diff --git a/vitest.config.ts b/vitest.config.ts index 3c5f2a292f75..d4a11b83d3b1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -10,6 +10,8 @@ const moduleNameMapper = {} as Record; 'field', 'card', 'provider', + 'utils', + 'descriptions', 'table', 'layout', ].forEach((shortName: string) => {