管理员个人中心

pull/59/MERGE
awenes 1 year ago
parent cd6c384f16
commit b1cb9d2b8d

@ -15,7 +15,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { LogoutOutlined } from '@ant-design/icons';
import { LogoutOutlined, UserOutlined } from '@ant-design/icons';
import { history, useIntl, useModel } from '@umijs/max';
import { Spin } from 'antd';
import type { MenuInfo } from 'rc-menu/lib/interface';
@ -26,6 +26,7 @@ import { isLoginPath, LOGIN_PATH } from '@/utils/utils';
import { outLogin } from '@/services';
import queryString from 'query-string';
import { createStyles } from 'antd-style';
import { ItemType } from 'antd/es/menu/hooks/useItems';
export type GlobalHeaderRightProps = {
menu?: boolean;
@ -90,7 +91,7 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ children }) =
});
return;
}
history.push(`/account/${key}`);
history.push(`/user/${key}`);
},
[initialState, setInitialState],
);
@ -117,7 +118,15 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ children }) =
return loading;
}
const menuItems = [
const menuItems: ItemType[] = [
{
key: 'center',
icon: <UserOutlined />,
label: intl.formatMessage({ id: 'components.right_content.center' }),
},
{
type: 'divider',
},
{
key: 'logout',
icon: <LogoutOutlined />,

@ -20,7 +20,7 @@ export default {
'component.tagSelect.collapse': '收起',
'component.tagSelect.all': '全部',
'components.right_content.center': '个人中心',
'components.right_content.setting': '个人设置',
'components.right_content.change-password': '修改密码',
'components.right_content.logout': '退出登录',
// excel import component

Loading…
Cancel
Save