提交 ec93edcc 编写于 作者: 陈帅

Increase the judgment of pathname

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册