diff --git a/src/common/libs/umi/layoutConfig.tsx b/src/common/libs/umi/layoutConfig.tsx index fca8307..a30a52a 100644 --- a/src/common/libs/umi/layoutConfig.tsx +++ b/src/common/libs/umi/layoutConfig.tsx @@ -44,22 +44,14 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => { // 确保header显示 header: true, // 隐藏面包屑导航 - breadcrumb: false, - // 隐藏header的默认内容 - headerTitleRender: false, + breadcrumb: { props: { style: { display: 'none' } } }, - // 自定义Header渲染 - 使用UmiJS自带header并添加用户信息 - headerRender: (props, defaultDom) => { + // 自定义Header渲染 - 只显示右侧用户信息,不显示面包屑 + headerRender: () => { return ( -
- {/* 左侧保留默认内容 */} -
- {defaultDom} -
+
{/* 右侧添加用户信息 */} -
- -
+
); },