This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/components/NaviCatalog Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { buildLog } from '@/utils'
1111import { SpaceGrow , Space } from '@/components/Common'
1212
1313import type { TMenuItem } from '../spec'
14- import { ROOT_MENU , CHILD_MENU } from '../constant'
14+ import { ROOT_MENU } from '../constant'
1515
1616import {
1717 Wrapper ,
@@ -50,17 +50,16 @@ type TProps = {
5050 withDivider : boolean
5151 showMoreItem : boolean
5252 showItemTotal : boolean
53-
5453 testid ?: string
5554
56- onSelect : ( id : string , type : string ) => void
55+ onItemSelect : ( item : TMenuItem ) => void
5756 onShowMore : ( ) => void
5857}
5958
6059const List : React . FC < TProps > = ( {
6160 menuMode,
6261 catalogItems,
63- onSelect ,
62+ onItemSelect ,
6463 activeCatalogId,
6564 activePath,
6665 withDivider,
@@ -82,7 +81,7 @@ const List: React.FC<TProps> = ({
8281 isRootMenu = { menuMode === ROOT_MENU }
8382 active = { active }
8483 withDivider = { withDivider }
85- onClick = { ( ) => onSelect ( item . id , item . displayType ) }
84+ onClick = { ( ) => onItemSelect ( item ) }
8685 >
8786 { item . fixedIcon && < FixedIcon src = { item . fixedIcon } /> }
8887 { item . title }
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ const NaviCatalog: React.FC<TProps> = ({
187187 < List
188188 menuMode = { menuMode }
189189 catalogItems = { catalogItems }
190- onSelect = { handleMenuItemSelect }
190+ onItemSelect = { handleMenuItemSelect }
191191 withDivider = { withDivider }
192192 activeCatalogId = { activeCatalogId }
193193 activePath = { activePath }
You can’t perform that action at this time.
0 commit comments