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
P
pro-blocks
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
pro-blocks
Commits
7176b4ac
Commit
7176b4ac
authored
Apr 25, 2018
by
jim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1324 Step-Form breadcrumbs path problem
parent
99715b01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
src/components/PageHeader/index.js
src/components/PageHeader/index.js
+20
-2
No files found.
src/components/PageHeader/index.js
View file @
7176b4ac
...
@@ -26,6 +26,18 @@ export default class PageHeader extends PureComponent {
...
@@ -26,6 +26,18 @@ export default class PageHeader extends PureComponent {
location
:
PropTypes
.
object
,
location
:
PropTypes
.
object
,
breadcrumbNameMap
:
PropTypes
.
object
,
breadcrumbNameMap
:
PropTypes
.
object
,
};
};
state
=
{
breadcrumb
:
null
,
};
componentDidMount
()
{
this
.
getBreadcrumbDom
();
}
componentWillReceiveProps
()
{
this
.
getBreadcrumbDom
();
}
onChange
=
key
=>
{
onChange
=
key
=>
{
if
(
this
.
props
.
onTabChange
)
{
if
(
this
.
props
.
onTabChange
)
{
this
.
props
.
onTabChange
(
key
);
this
.
props
.
onTabChange
(
key
);
...
@@ -39,6 +51,12 @@ export default class PageHeader extends PureComponent {
...
@@ -39,6 +51,12 @@ export default class PageHeader extends PureComponent {
breadcrumbNameMap
:
this
.
props
.
breadcrumbNameMap
||
this
.
context
.
breadcrumbNameMap
,
breadcrumbNameMap
:
this
.
props
.
breadcrumbNameMap
||
this
.
context
.
breadcrumbNameMap
,
};
};
};
};
getBreadcrumbDom
=
()
=>
{
const
breadcrumb
=
this
.
conversionBreadcrumbList
();
this
.
setState
({
breadcrumb
,
});
};
// Generated according to props
// Generated according to props
conversionFromProps
=
()
=>
{
conversionFromProps
=
()
=>
{
const
{
breadcrumbList
,
breadcrumbSeparator
,
linkElement
=
'
a
'
}
=
this
.
props
;
const
{
breadcrumbList
,
breadcrumbSeparator
,
linkElement
=
'
a
'
}
=
this
.
props
;
...
@@ -158,8 +176,8 @@ export default class PageHeader extends PureComponent {
...
@@ -158,8 +176,8 @@ export default class PageHeader extends PureComponent {
tabDefaultActiveKey
,
tabDefaultActiveKey
,
tabBarExtraContent
,
tabBarExtraContent
,
}
=
this
.
props
;
}
=
this
.
props
;
const
clsString
=
classNames
(
styles
.
pageHeader
,
className
);
const
clsString
=
classNames
(
styles
.
pageHeader
,
className
);
const
breadcrumb
=
this
.
conversionBreadcrumbList
();
const
activeKeyProps
=
{};
const
activeKeyProps
=
{};
if
(
tabDefaultActiveKey
!==
undefined
)
{
if
(
tabDefaultActiveKey
!==
undefined
)
{
activeKeyProps
.
defaultActiveKey
=
tabDefaultActiveKey
;
activeKeyProps
.
defaultActiveKey
=
tabDefaultActiveKey
;
...
@@ -170,7 +188,7 @@ export default class PageHeader extends PureComponent {
...
@@ -170,7 +188,7 @@ export default class PageHeader extends PureComponent {
return
(
return
(
<
div
className
=
{
clsString
}
>
<
div
className
=
{
clsString
}
>
{
breadcrumb
}
{
this
.
state
.
breadcrumb
}
<
div
className
=
{
styles
.
detail
}
>
<
div
className
=
{
styles
.
detail
}
>
{
logo
&&
<
div
className
=
{
styles
.
logo
}
>
{
logo
}
<
/div>
}
{
logo
&&
<
div
className
=
{
styles
.
logo
}
>
{
logo
}
<
/div>
}
<
div
className
=
{
styles
.
main
}
>
<
div
className
=
{
styles
.
main
}
>
...
...
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