mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 09:34:31 +08:00
修复pageTitle
This commit is contained in:
@@ -62,9 +62,6 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
location: {
|
||||
pathname: '/',
|
||||
},
|
||||
navTheme: 'light',
|
||||
fixSiderbar: true,
|
||||
contentWidth: 'Fixed',
|
||||
|
||||
@@ -56,9 +56,6 @@ export default function (props: any) {
|
||||
history.push('/login');
|
||||
}
|
||||
vhCheck();
|
||||
|
||||
// patch custome layout title as react node [object, object]
|
||||
document.title = '控制面板';
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -135,7 +132,12 @@ export default function (props: any) {
|
||||
},
|
||||
];
|
||||
}}
|
||||
pageTitleRender={() => '控制面板'}
|
||||
pageTitleRender={(props, pageName, info) => {
|
||||
if (info) {
|
||||
return `${info.pageName} - 控制面板`;
|
||||
}
|
||||
return '控制面板';
|
||||
}}
|
||||
{...defaultProps}
|
||||
>
|
||||
{React.Children.map(props.children, (child) => {
|
||||
|
||||
Reference in New Issue
Block a user