From 556a18b424ee5d4a253c1f91e59080ab4d30eb60 Mon Sep 17 00:00:00 2001 From: xg4 Date: Tue, 8 Feb 2022 14:08:26 +0800 Subject: [PATCH] =?UTF-8?q?chore(util):=20=E4=BF=AE=E6=94=B9=20lodash=20?= =?UTF-8?q?=E5=BC=95=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/menu/hooks/useMenuContext.ts | 2 +- src/select/base/Select.tsx | 2 +- src/select/util/helper.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/menu/hooks/useMenuContext.ts b/src/menu/hooks/useMenuContext.ts index 058314323..3332e718b 100644 --- a/src/menu/hooks/useMenuContext.ts +++ b/src/menu/hooks/useMenuContext.ts @@ -1,4 +1,4 @@ -import { noop } from 'lodash'; +import noop from 'lodash/noop'; import { useState, ReactNode } from 'react'; import { MenuState, SetMenuState, MenuMode } from '../MenuContext'; import checkSubMenuChildExpanded from '../_util/checkSubMenuChildExpanded'; diff --git a/src/select/base/Select.tsx b/src/select/base/Select.tsx index 89dba7838..816b01a68 100644 --- a/src/select/base/Select.tsx +++ b/src/select/base/Select.tsx @@ -5,7 +5,7 @@ import isFunction from 'lodash/isFunction'; import get from 'lodash/get'; import isString from 'lodash/isString'; -import { isNumber } from 'lodash'; +import isNumber from 'lodash/isNumber'; import { useLocaleReceiver } from '../../locale/LocalReceiver'; import useConfig from '../../_util/useConfig'; import composeRefs from '../../_util/composeRefs'; diff --git a/src/select/util/helper.ts b/src/select/util/helper.ts index 3c5aa78e8..2d33337f3 100644 --- a/src/select/util/helper.ts +++ b/src/select/util/helper.ts @@ -1,5 +1,6 @@ import { ReactElement } from 'react'; -import { isPlainObject, get } from 'lodash'; +import isPlainObject from 'lodash/isPlainObject'; +import get from 'lodash/get'; import OptionGroup from '../base/OptionGroup'; import Option from '../base/Option';