Commit 63fcc3d9 authored by jim's avatar jim

Ugly fix #1409

parent e15226a3
...@@ -21,3 +21,4 @@ yarn.lock ...@@ -21,3 +21,4 @@ yarn.lock
package-lock.json package-lock.json
*bak *bak
jsconfig.json jsconfig.json
.vscode/settings.json
...@@ -34,10 +34,12 @@ export default class PageHeader extends PureComponent { ...@@ -34,10 +34,12 @@ export default class PageHeader extends PureComponent {
componentDidMount() { componentDidMount() {
this.getBreadcrumbDom(); this.getBreadcrumbDom();
} }
componentWillReceiveProps() {
componentDidUpdate(preProps) {
if (preProps.tabActiveKey !== this.props.tabActiveKey) {
this.getBreadcrumbDom(); this.getBreadcrumbDom();
} }
}
onChange = key => { onChange = key => {
if (this.props.onTabChange) { if (this.props.onTabChange) {
this.props.onTabChange(key); this.props.onTabChange(key);
......
...@@ -25,10 +25,11 @@ export default class StepForm extends PureComponent { ...@@ -25,10 +25,11 @@ export default class StepForm extends PureComponent {
} }
} }
render() { render() {
const { match, routerData } = this.props; const { match, routerData, location } = this.props;
return ( return (
<PageHeaderLayout <PageHeaderLayout
title="分步表单" title="分步表单"
tabActiveKey={location.pathname}
content="将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。" content="将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。"
> >
<Card bordered={false}> <Card bordered={false}>
......
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