style(web): 页面内容区不再重复渲染标题,标题统一由 TopNav 呈现
This commit is contained in:
@@ -2,7 +2,7 @@ import { history, Outlet, useLocation } from '@umijs/max';
|
||||
import { PageContainer, ProLayout } from '@ant-design/pro-components';
|
||||
import { Dropdown } from 'antd';
|
||||
import { LogoutOutlined } from '@ant-design/icons';
|
||||
import { pageMetadata, menu } from '@/utils/metadata';
|
||||
import { menu } from '@/utils/metadata';
|
||||
|
||||
// 菜单结构与 web.archived/src/app/Layout.jsx 完全一致(运营 / 资源 两组),页头标题规则对齐 pageMetadataRules。
|
||||
// /login 独立页:不走 ProLayout(对齐归档版布局分支)。
|
||||
@@ -11,7 +11,6 @@ import { pageMetadata, menu } from '@/utils/metadata';
|
||||
export default function Layout() {
|
||||
const location = useLocation();
|
||||
if (location.pathname === '/login') return <Outlet />;
|
||||
const metadata = pageMetadata(location.pathname);
|
||||
|
||||
return (
|
||||
<ProLayout
|
||||
@@ -60,7 +59,7 @@ export default function Layout() {
|
||||
),
|
||||
}}
|
||||
>
|
||||
<PageContainer title={metadata.title} subTitle={metadata.subtitle} ghost>
|
||||
<PageContainer title={false} subTitle={false} ghost>
|
||||
<Outlet />
|
||||
</PageContainer>
|
||||
</ProLayout>
|
||||
|
||||
Reference in New Issue
Block a user