bug修复
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
francis-fh
2026-06-16 22:58:59 +08:00
parent bcb5c6af19
commit 077f6548cf
7 changed files with 264 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import { AvatarDropdown, AvatarName, Footer, SelectLang } from '@/components';
import EnterpriseHeader from '@/components/EnterpriseHeader';
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
import { SettingDrawer } from '@ant-design/pro-components';
import type { RunTimeLayoutConfig } from '@umijs/max';
@@ -166,8 +167,11 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) =
// 增加一个 loading 的状态
childrenRender: (children) => {
// if (initialState?.loading) return <PageLoading />;
// roles?.[0] 为 'view' 时是企业账号,显示返回首页顶栏
const isEnterprise = initialState?.currentUser?.userType === 'view';
return (
<>
{isEnterprise && <EnterpriseHeader />}
{children}
<SettingDrawer
disableUrlParams