Browse Source

Delete hardcode, decouple location

pull/2088/head
陈帅 8 years ago
parent
commit
1e0a8c5d8c
  1. 1275
      log.csv
  2. 10
      src/components/PageHeader/index.js
  3. 2
      src/components/PageHeader/index.less

1275
log.csv

File diff suppressed because it is too large

10
src/components/PageHeader/index.js

@ -28,12 +28,12 @@ export default class PageHeader extends PureComponent {
}
componentDidUpdate(preProps) {
const {
tabActiveKey,
location: { pathname },
} = this.props;
const { location } = this.props;
if (!location || !preProps.location) {
return;
}
const prePathname = preProps.location.pathname;
if (preProps.tabActiveKey !== tabActiveKey || prePathname !== pathname) {
if (prePathname !== location.pathname) {
this.getBreadcrumbDom();
}
}

2
src/components/PageHeader/index.less

@ -22,7 +22,7 @@
}
.tabs {
margin: 0 0 -17px -8px;
margin: 0 0 0 -8px;
:global {
.ant-tabs-bar {

Loading…
Cancel
Save