Skip to content

Commit c6e473e

Browse files
committed
fix(basic-layout): 修复右上角菜单图标不显示
1 parent 7050d08 commit c6e473e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

examples/base/src/layouts/BasicLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ function BasicLayoutScreen(props: KktproPageProps) {
3232
menus: [
3333
{
3434
title: '欢迎来到uiw',
35-
icon: 'smile',
35+
icon: <Icon type="smile" />,
3636
onClick: () => layouts.closeMenu(),
3737
},
3838
{
3939
title: '修改密码',
40-
icon: 'setting',
40+
icon: <Icon type="setting" />,
4141
onClick: () => layouts.closeMenu(),
4242
},
4343
],

examples/base/src/pages/TableList/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default function Demo() {
2828
const handleSearch = (val: string) => {
2929
setVal(val)
3030
}
31-
// console.log(table)
3231
return (
3332
<ProTable
3433
// 操作栏按钮

packages/basic-layouts/src/HeaderRightMenu/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useMemo } from 'react';
2-
import { Menu, Avatar, Popover } from 'uiw';
2+
import { Menu, Avatar, Popover, Icon } from 'uiw';
33
import { useNavigate, NavigateFunction } from 'react-router-dom';
44
import { UseLayoutsProps } from '../useLayouts';
55
import './index.css';
@@ -63,7 +63,7 @@ export default function HeaderRightMenu({
6363
账号 {profile?.userName || 'admin'}
6464
</span>
6565
),
66-
icon: 'user',
66+
icon: <Icon type="user" />,
6767
},
6868
{
6969
divider: true,
@@ -73,13 +73,13 @@ export default function HeaderRightMenu({
7373
...menus,
7474
{
7575
title: '刷新权限',
76-
icon: 'reload',
76+
icon: <Icon type="reload" />,
7777
onClick: () => onReloadAuth(),
7878
style: { display: hideReloadButton ? 'none' : '' },
7979
},
8080
{
8181
title: '退出登录',
82-
icon: 'logout',
82+
icon: <Icon type="logout" />,
8383
style: { display: hideLogoutButton ? 'none' : '' },
8484
onClick: () => {
8585
if (onLogout) {

0 commit comments

Comments
 (0)