diff --git a/.gitignore b/.gitignore index fd9bf875668fb3b3a8d6df470ce665a4ad130bd1..4770ad5a6684369b81af366b69933de3fc2d64a6 100755 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ yarn.lock package-lock.json *bak jsconfig.json +.vscode/settings.json diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 993bd57e98d9c380486886140463b386928845c3..3080ed041a6bb43fd728cb8cba3fabe907e1d748 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -34,10 +34,12 @@ export default class PageHeader extends PureComponent { componentDidMount() { this.getBreadcrumbDom(); } - componentWillReceiveProps() { - this.getBreadcrumbDom(); - } + componentDidUpdate(preProps) { + if (preProps.tabActiveKey !== this.props.tabActiveKey) { + this.getBreadcrumbDom(); + } + } onChange = key => { if (this.props.onTabChange) { this.props.onTabChange(key); diff --git a/src/routes/Forms/StepForm/index.js b/src/routes/Forms/StepForm/index.js index 822cb504807d1cbb9d774c3117b89af2b0a0abad..3ab2374ba7c223bec541d1fe2cf9e9287033dc8a 100644 --- a/src/routes/Forms/StepForm/index.js +++ b/src/routes/Forms/StepForm/index.js @@ -25,10 +25,11 @@ export default class StepForm extends PureComponent { } } render() { - const { match, routerData } = this.props; + const { match, routerData, location } = this.props; return (