diff --git a/src/defaultSettings.js b/src/defaultSettings.js index c254c74efb75913bbf8ad94f3b2d3dd44408df56..0c61109719fe305522f29e963194a502fb1d33f1 100644 --- a/src/defaultSettings.js +++ b/src/defaultSettings.js @@ -6,4 +6,5 @@ module.exports = { fixedHeader: false, // sticky header autoHideHeader: false, // auto hide header fixSiderbar: false, // sticky siderbar + title: 'Ant Design Pro', }; diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index dba40f3431722ab1f4451cc535fdea4d8cf9d049..d5306093ec25b98cb0ee1362cb38cb6e97703faa 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -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 = () => {