Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6962184

Browse files
fix: 🧩 个人信息下拉框添加图标
1 parent a5d2d37 commit 6962184

File tree

1 file changed

+34
-5
lines changed
  • src/components/layouts/components/Header

1 file changed

+34
-5
lines changed

‎src/components/layouts/components/Header/index.tsx‎

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ import { useState } from "react";
22
import { useNavigate } from "react-router-dom";
33
import { Layout, Button, Tooltip, Dropdown, Avatar, theme, Modal } from "antd";
44
import type { MenuProps } from "antd";
5-
import { MenuUnfoldOutlined, SkinOutlined, MenuFoldOutlined, UserOutlined, FontSizeOutlined } from "@ant-design/icons";
5+
import {
6+
MenuUnfoldOutlined,
7+
SkinOutlined,
8+
MenuFoldOutlined,
9+
UserOutlined,
10+
FontSizeOutlined,
11+
HomeOutlined,
12+
KeyOutlined,
13+
LogoutOutlined
14+
} from "@ant-design/icons";
615
import { SizeType } from "antd/es/config-provider/SizeContext";
716

817
import { useDispatch, useSelector } from "@/store";
@@ -22,22 +31,42 @@ function Head() {
2231
const items: MenuProps["items"] = [
2332
{
2433
key: "1",
25-
label: <span>首页</span>
34+
label: (
35+
<span>
36+
<HomeOutlined className="mr-4" />
37+
首页
38+
</span>
39+
)
2640
},
2741
{
2842
key: "2",
29-
label: <span>个人信息</span>
43+
label: (
44+
<span>
45+
<UserOutlined className="mr-4" />
46+
个人信息
47+
</span>
48+
)
3049
},
3150
{
3251
key: "3",
33-
label: <span>修改密码</span>
52+
label: (
53+
<span>
54+
<KeyOutlined className="mr-4" />
55+
修改密码
56+
</span>
57+
)
3458
},
3559
{
3660
type: "divider"
3761
},
3862
{
3963
key: "4",
40-
label: <span>退出登录</span>,
64+
label: (
65+
<span>
66+
<LogoutOutlined className="mr-4" />
67+
退出登录
68+
</span>
69+
),
4170
onClick: () => {
4271
setIsModalOpen(true);
4372
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /