feat: move dataset (#277)

This commit is contained in:
Archer
2023-09-11 18:23:51 +08:00
committed by GitHub
parent ae2887e956
commit b46048609c
17 changed files with 422 additions and 60 deletions

View File

@@ -8,7 +8,7 @@ interface Props {
menuList: {
isActive?: boolean;
child: React.ReactNode;
onClick: () => void;
onClick: () => any;
}[];
}
@@ -37,7 +37,10 @@ const MyMenu = ({ width, offset = [0, 10], Button, menuList }: Props) => {
<MenuItem
key={i}
{...menuItemStyles}
onClick={item.onClick}
onClick={(e) => {
e.stopPropagation();
item.onClick && item.onClick();
}}
color={item.isActive ? 'hover.blue' : ''}
>
{item.child}