index.jsx 1.0 KB

12345678910111213141516171819202122232425262728
  1. import React from 'react';
  2. import { Nav } from '@douyinfe/semi-ui';
  3. import { IconSemiLogo } from '@douyinfe/semi-icons';
  4. import { IconDescriptions, IconIntro, IconTree, IconAvatar, IconTreeSelect, IconTabs } from '@douyinfe/semi-icons-lab';
  5. export default function NumberItemKey() {
  6. const [openKeys, setOpenKeys] = useState([]);
  7. return (
  8. <Nav
  9. bodyStyle={{ height: 320 }}
  10. openKeys={openKeys}
  11. onOpenChange={props => setOpenKeys(props.openKeys)}
  12. items={[
  13. { itemKey: 1, text: '用户管理', icon: <IconAvatar /> },
  14. { itemKey: 2, text: '活动管理', icon: <IconDescriptions /> },
  15. {
  16. text: '任务平台',
  17. icon: <IconTree />,
  18. itemKey: 3,
  19. items: ['任务管理', '用户任务查询'],
  20. },
  21. ]}
  22. onSelect={data => console.log('trigger onSelect: ', data)}
  23. onClick={data => console.log('trigger onClick: ', data)}
  24. />
  25. );
  26. };