Unverified Commit 09fbaa96 authored by ι™ˆεΈ…'s avatar ι™ˆεΈ… Committed by GitHub

feat: add new config "title" (#3309)

parent d2f2e1c8
......@@ -6,4 +6,5 @@ module.exports = {
fixedHeader: false, // sticky header
autoHideHeader: false, // auto hide header
fixSiderbar: false, // sticky siderbar
title: 'Ant Design Pro',
};
......@@ -17,7 +17,7 @@ import Context from './MenuContext';
import Exception403 from '../pages/Exception/403';
import PageLoading from '@/components/PageLoading';
import SiderMenu from '@/components/SiderMenu';
import { title } from '../defaultSettings';
import styles from './BasicLayout.less';
// lazy load SettingDrawer
......@@ -116,14 +116,14 @@ class BasicLayout extends React.PureComponent {
const currRouterData = this.matchParamsPath(pathname, breadcrumbNameMap);
if (!currRouterData) {
return 'Ant Design Pro';
return title;
}
const pageName = formatMessage({
id: currRouterData.locale || currRouterData.name,
defaultMessage: currRouterData.name,
});
return `${pageName} - Ant Design Pro`;
return `${pageName} - ${title}`;
};
getLayoutStyle = () => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment