Commit ec93edcc authored by 陈帅's avatar 陈帅

Increase the judgment of pathname

parent 8f0262b2
......@@ -35,8 +35,12 @@ export default class PageHeader extends PureComponent {
}
componentDidUpdate(preProps) {
const { tabActiveKey } = this.props;
if (preProps.tabActiveKey !== tabActiveKey) {
const {
tabActiveKey,
location: { pathname },
} = this.props;
const prePathname = preProps.location.pathname;
if (preProps.tabActiveKey !== tabActiveKey || prePathname !== pathname) {
this.getBreadcrumbDom();
}
}
......
import React from 'react';
import { FormattedMessage } from 'umi/locale';
import { Link } from 'dva/router';
import PageHeader from '../../components/PageHeader';
import PageHeader from 'components/PageHeader';
import GridContent from './GridContent';
import styles from './PageHeaderLayout.less';
import MenuContext from './MenuContext';
......
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