From 480a02778c5bcf8ff58e902d5815cce98d361569 Mon Sep 17 00:00:00 2001 From: Avan Date: Wed, 7 Aug 2024 11:56:35 +0800 Subject: [PATCH] refactor: remove onClick key params --- src/components/tab-bar/tab-bar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tab-bar/tab-bar.tsx b/src/components/tab-bar/tab-bar.tsx index 83c9958d0b..0050bb3175 100644 --- a/src/components/tab-bar/tab-bar.tsx +++ b/src/components/tab-bar/tab-bar.tsx @@ -12,7 +12,7 @@ export type TabBarItemProps = { icon?: ReactNode | ((active: boolean) => ReactNode) title?: ReactNode | ((active: boolean) => ReactNode) badge?: BadgeProps['content'] - onClick?: (key: string) => void + onClick?: () => void } & NativeProps /* istanbul ignore next */ @@ -122,7 +122,7 @@ export const TabBar: FC = p => { if (key === undefined || key === null) return setActiveKey(key.toString()) - item.props.onClick?.(key as string) + item.props.onClick?.() }} className={classNames(`${classPrefix}-item`, { [`${classPrefix}-item-active`]: active,