You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
729 B
Plaintext

11 months ago
import { DownOutlined } from '@ant-design/icons';
import type { MenuProps } from 'antd';
import { Dropdown, Space } from 'antd';
import { UserOutlined } from '@ant-design/icons'
import { Link } from 'react-router-dom';
const items: MenuProps['items'] = [
{
label: <Link to="/login">退出登录</Link>,
key: 'logout',
},
];
const UserInfoDropdown = () => {
return (
<Dropdown menu={{ items }} trigger={['click']}>
<div style={{ cursor: 'pointer' }}>
<Space>
<UserOutlined />
Admin
<DownOutlined />
</Space>
</div>
</Dropdown>
)
}
export default UserInfoDropdown