修改文件
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { outLogin } from '@/services/user/index';
|
||||
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
|
||||
import { LogoutOutlined, SettingOutlined, UserOutlined, SecurityScanOutlined } from '@ant-design/icons';
|
||||
import { history, useModel } from '@umijs/max';
|
||||
import { Spin } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
@@ -72,6 +72,10 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
|
||||
loginOut();
|
||||
return;
|
||||
}
|
||||
if (key === 'uppass') {
|
||||
history.push(`/system/uppass`);
|
||||
return;
|
||||
}
|
||||
history.push(`/account/${key}`);
|
||||
},
|
||||
[setInitialState],
|
||||
@@ -102,26 +106,32 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
|
||||
const menuItems = [
|
||||
...(menu
|
||||
? [
|
||||
{
|
||||
key: 'center',
|
||||
icon: <UserOutlined />,
|
||||
label: '个人中心',
|
||||
},
|
||||
{
|
||||
key: 'settings',
|
||||
icon: <SettingOutlined />,
|
||||
label: '个人设置',
|
||||
},
|
||||
{
|
||||
type: 'divider' as const,
|
||||
},
|
||||
]
|
||||
{
|
||||
key: 'center',
|
||||
icon: <UserOutlined />,
|
||||
label: '个人中心',
|
||||
},
|
||||
{
|
||||
key: 'settings',
|
||||
icon: <SettingOutlined />,
|
||||
label: '个人设置',
|
||||
},
|
||||
{
|
||||
type: 'divider' as const,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
key: 'uppass',
|
||||
icon: <SecurityScanOutlined />,
|
||||
label: '修改密码',
|
||||
},
|
||||
{
|
||||
key: 'logout',
|
||||
icon: <LogoutOutlined />,
|
||||
label: '退出登录',
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user