Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
09fbaa96
Unverified
Commit
09fbaa96
authored
Jan 08, 2019
by
ιεΈ
Committed by
GitHub
Jan 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add new config "title" (#3309)
parent
d2f2e1c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/defaultSettings.js
src/defaultSettings.js
+1
-0
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+3
-3
No files found.
src/defaultSettings.js
View file @
09fbaa96
...
@@ -6,4 +6,5 @@ module.exports = {
...
@@ -6,4 +6,5 @@ module.exports = {
fixedHeader
:
false
,
// sticky header
fixedHeader
:
false
,
// sticky header
autoHideHeader
:
false
,
// auto hide header
autoHideHeader
:
false
,
// auto hide header
fixSiderbar
:
false
,
// sticky siderbar
fixSiderbar
:
false
,
// sticky siderbar
title
:
'
Ant Design Pro
'
,
};
};
src/layouts/BasicLayout.js
View file @
09fbaa96
...
@@ -17,7 +17,7 @@ import Context from './MenuContext';
...
@@ -17,7 +17,7 @@ import Context from './MenuContext';
import
Exception403
from
'
../pages/Exception/403
'
;
import
Exception403
from
'
../pages/Exception/403
'
;
import
PageLoading
from
'
@/components/PageLoading
'
;
import
PageLoading
from
'
@/components/PageLoading
'
;
import
SiderMenu
from
'
@/components/SiderMenu
'
;
import
SiderMenu
from
'
@/components/SiderMenu
'
;
import
{
title
}
from
'
../defaultSettings
'
;
import
styles
from
'
./BasicLayout.less
'
;
import
styles
from
'
./BasicLayout.less
'
;
// lazy load SettingDrawer
// lazy load SettingDrawer
...
@@ -116,14 +116,14 @@ class BasicLayout extends React.PureComponent {
...
@@ -116,14 +116,14 @@ class BasicLayout extends React.PureComponent {
const
currRouterData
=
this
.
matchParamsPath
(
pathname
,
breadcrumbNameMap
);
const
currRouterData
=
this
.
matchParamsPath
(
pathname
,
breadcrumbNameMap
);
if
(
!
currRouterData
)
{
if
(
!
currRouterData
)
{
return
'
Ant Design Pro
'
;
return
title
;
}
}
const
pageName
=
formatMessage
({
const
pageName
=
formatMessage
({
id
:
currRouterData
.
locale
||
currRouterData
.
name
,
id
:
currRouterData
.
locale
||
currRouterData
.
name
,
defaultMessage
:
currRouterData
.
name
,
defaultMessage
:
currRouterData
.
name
,
});
});
return
`
${
pageName
}
-
Ant Design Pro
`
;
return
`
${
pageName
}
-
${
title
}
`
;
};
};
getLayoutStyle
=
()
=>
{
getLayoutStyle
=
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment