style: common component style
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// @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';
|
||||
@@ -11,6 +10,7 @@ export function getRightRenderContent(opts: {
|
||||
initialState: any;
|
||||
setInitialState: any;
|
||||
}) {
|
||||
console.log('runtimeConfig==', opts.runtimeConfig, opts);
|
||||
if (opts.runtimeConfig.rightRender) {
|
||||
return opts.runtimeConfig.rightRender(
|
||||
opts.initialState,
|
||||
@@ -67,6 +67,20 @@ export function getRightRenderContent(opts: {
|
||||
onClick: () => {
|
||||
opts?.runtimeConfig?.logout?.(opts.initialState);
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'theme',
|
||||
label: <>外观</>,
|
||||
onClick: () => {
|
||||
console.log('theme');
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'lang',
|
||||
label: '语言',
|
||||
onClick: () => {
|
||||
console.log('lang');
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -96,12 +110,15 @@ export function getRightRenderContent(opts: {
|
||||
return (
|
||||
<div className="umi-plugin-layout-right anticon">
|
||||
{opts.runtimeConfig.logout ? (
|
||||
<Dropdown
|
||||
{...dropdownProps}
|
||||
overlayClassName="umi-plugin-layout-container"
|
||||
>
|
||||
{avatar}
|
||||
</Dropdown>
|
||||
<>
|
||||
<Dropdown
|
||||
{...dropdownProps}
|
||||
overlayClassName="umi-plugin-layout-container"
|
||||
>
|
||||
{avatar}
|
||||
</Dropdown>
|
||||
<span></span>
|
||||
</>
|
||||
) : (
|
||||
avatar
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user