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
fc136b6a
Commit
fc136b6a
authored
Jun 05, 2019
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: fix #4349,UserLayout getPageTitle doesn't show title
parent
820b6391
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
44 deletions
+51
-44
src/layouts/UserLayout.tsx
src/layouts/UserLayout.tsx
+51
-44
No files found.
src/layouts/UserLayout.tsx
View file @
fc136b6a
import
SelectLang
from
'
@/components/SelectLang
'
;
import
GlobalFooter
from
'
@/components/GlobalFooter
'
;
import
{
ConnectProps
}
from
'
@/models/connect
'
;
import
{
ConnectProps
,
ConnectState
}
from
'
@/models/connect
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Icon
}
from
'
antd
'
;
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
React
from
'
react
'
;
import
DocumentTitle
from
'
react-document-title
'
;
import
{
formatMessage
}
from
'
umi-plugin-locale
'
;
import
{
formatMessage
}
from
'
umi-plugin-
react/
locale
'
;
import
Link
from
'
umi/link
'
;
import
logo
from
'
../assets/logo.svg
'
;
import
styles
from
'
./UserLayout.less
'
;
...
...
@@ -29,32 +30,37 @@ const links = [
];
const
copyright
=
(
<
Fragment
>
<>
Copyright
<
Icon
type
=
"copyright"
/>
2019 θθιζδ½ιͺζζ―ι¨εΊε
</
Fragment
>
</>
);
export
interface
UserLayoutProps
extends
ConnectProps
{
breadcrumbNameMap
:
{
[
path
:
string
]:
MenuDataItem
};
navTheme
:
string
;
}
class
UserLayout
extends
Component
<
UserLayoutProps
>
{
render
()
{
const
UserLayout
:
React
.
SFC
<
UserLayoutProps
>
=
props
=>
{
const
{
route
=
{
routes
:
[],
},
}
=
this
.
props
;
}
=
props
;
const
{
routes
=
[]
}
=
route
;
const
{
children
,
location
}
=
this
.
props
;
const
{
breadcrumb
}
=
getMenuData
(
routes
,
this
.
props
);
const
{
children
,
location
=
{
pathname
:
''
,
},
}
=
props
;
const
{
breadcrumb
}
=
getMenuData
(
routes
,
props
);
return
(
<
DocumentTitle
title
=
{
getPageTitle
({
pathname
:
location
!
.
pathname
,
pathname
:
location
.
pathname
,
breadcrumb
,
formatMessage
,
...
props
,
})
}
>
<
div
className
=
{
styles
.
container
}
>
...
...
@@ -77,7 +83,8 @@ class UserLayout extends Component<UserLayoutProps> {
</
div
>
</
DocumentTitle
>
);
}
}
};
export
default
UserLayout
;
export
default
connect
(({
settings
}:
ConnectState
)
=>
({
...
settings
,
}))(
UserLayout
);
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