|
@@ -0,0 +1,48 @@
|
|
|
+import React from 'react'
|
|
|
+import { PlusOutlined, DownOutlined } from '@ant-design/icons'
|
|
|
+import { Button, Popover } from 'antd'
|
|
|
+import './index.less'
|
|
|
+
|
|
|
+type RoleMenuProps = {
|
|
|
+ menuId: string
|
|
|
+ onSelect?: (id: string) => void
|
|
|
+}
|
|
|
+
|
|
|
+const RoleMenu: React.FC<RoleMenuProps> = () => {
|
|
|
+ // const [activeId, setActiveId] = useState('')
|
|
|
+ const content = (
|
|
|
+ <div className="popoverList">
|
|
|
+ <ul>
|
|
|
+ <li>复制</li>
|
|
|
+ <li>粘贴</li>
|
|
|
+ <li className="text-red-500">删除</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+
|
|
|
+ return (
|
|
|
+ <div className="h-full w-max-234px rounded-4px roleMenu">
|
|
|
+ <div className="p-4 border-b-1 border-solid border-black border-opacity-10 bg-[#f7f9fa] flex justify-around items-center">
|
|
|
+ <span className="text-[0.9375rem]">角色列表</span>
|
|
|
+ <Button size="small" type="primary" ghost>
|
|
|
+ <PlusOutlined />
|
|
|
+ 创建角色
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ <div className="p-4 bg-white" style={{ height: 'calc(100% - 1rem*2 - 20px)' }}>
|
|
|
+ <ul className="p-0 m-0 list-none text-primary flex flex-col flex-1">
|
|
|
+ <li
|
|
|
+ className="flex justify-between items-center py-2 px-5"
|
|
|
+ onClick={() => setActiveId('1')}>
|
|
|
+ <span>客户管理员</span>
|
|
|
+ <Popover placement="bottomRight" content={content} trigger="click">
|
|
|
+ <DownOutlined />
|
|
|
+ </Popover>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+export default RoleMenu
|