feat: nodes list

This commit is contained in:
jialin
2024-05-20 18:13:05 +08:00
parent 313da7a9d2
commit 96e83878d1
13 changed files with 415 additions and 46 deletions
+7 -9
View File
@@ -1,6 +1,7 @@
// @ts-nocheck
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import avatarImg from '@/assets/images/avatar.png';
import { LogoutOutlined } from '@ant-design/icons';
import { Avatar, Dropdown, Menu, Spin, version } from 'antd';
@@ -14,7 +15,7 @@ export function getRightRenderContent(opts: {
return opts.runtimeConfig.rightRender(
opts.initialState,
opts.setInitialState,
opts.runtimeConfig,
opts.runtimeConfig
);
}
@@ -32,10 +33,7 @@ export function getRightRenderContent(opts: {
<Avatar
size="small"
className="umi-plugin-layout-avatar"
src={
opts.initialState?.avatar ||
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
}
src={opts.initialState?.avatar || avatarImg}
alt="avatar"
/>
) : null}
@@ -68,9 +66,9 @@ export function getRightRenderContent(opts: {
),
onClick: () => {
opts?.runtimeConfig?.logout?.(opts.initialState);
},
},
],
}
}
]
};
// antd@5 和 4.24 之后推荐使用 menu,性能更好
let dropdownProps;
@@ -86,7 +84,7 @@ export function getRightRenderContent(opts: {
</Menu.Item>
))}
</Menu>
),
)
};
} else {
// 需要 antd 4.20.0 以上版本