index.jsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React from 'react';
  2. import { Nav } from '@douyinfe/semi-ui';
  3. import { IconUser, IconStar, IconUserGroup, IconEdit, IconApps, IconSetting } from '@douyinfe/semi-icons';
  4. export default function GetPopupNav() {
  5. const items = [
  6. { itemKey: 'user', text: '用户管理', icon: <IconUser />, disabled: true },
  7. { itemKey: 'union', text: '公会中心', icon: <IconStar /> },
  8. {
  9. text: '任务平台',
  10. icon: <IconSetting />,
  11. itemKey: 'job',
  12. disabled: true,
  13. items: [{ itemKey: 'job_manage', text: '任务管理', disabled: true }, '用户任务查询'],
  14. },
  15. {
  16. text: '收藏夹',
  17. icon: <IconStar />,
  18. itemKey: 'star',
  19. items: [{ itemKey: 'like', text: '我的喜欢', disabled: true }, '点赞'],
  20. },
  21. ];
  22. return (
  23. <div>
  24. <div id={'con'} style={{ position: 'relative ' }}>
  25. </div>
  26. <Nav
  27. items={items}
  28. mode={'horizontal'}
  29. defaultOpenKeys={['job', 'star']}
  30. getPopupContainer={() => document.querySelector('#con')}
  31. defaultSelectedKeys={['user']}
  32. footer={{
  33. collapseButton: true,
  34. }}
  35. />
  36. </div>
  37. );
  38. }