Commit 1e0a8c5d authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

Delete hardcode, decouple location

parent 7cc1fccd
This diff is collapsed.
...@@ -28,12 +28,12 @@ export default class PageHeader extends PureComponent { ...@@ -28,12 +28,12 @@ export default class PageHeader extends PureComponent {
} }
componentDidUpdate(preProps) { componentDidUpdate(preProps) {
const { const { location } = this.props;
tabActiveKey, if (!location || !preProps.location) {
location: { pathname }, return;
} = this.props; }
const prePathname = preProps.location.pathname; const prePathname = preProps.location.pathname;
if (preProps.tabActiveKey !== tabActiveKey || prePathname !== pathname) { if (prePathname !== location.pathname) {
this.getBreadcrumbDom(); this.getBreadcrumbDom();
} }
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
} }
.tabs { .tabs {
margin: 0 0 -17px -8px; margin: 0 0 0 -8px;
:global { :global {
.ant-tabs-bar { .ant-tabs-bar {
......
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