Browse Source

Ugly fix #1409

pull/1500/head
jim 9 years ago
parent
commit
63fcc3d979
  1. 1
      .gitignore
  2. 8
      src/components/PageHeader/index.js
  3. 3
      src/routes/Forms/StepForm/index.js

1
.gitignore

@ -21,3 +21,4 @@ yarn.lock
package-lock.json
*bak
jsconfig.json
.vscode/settings.json

8
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);

3
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 (
<PageHeaderLayout
title="分步表单"
tabActiveKey={location.pathname}
content="将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。"
>
<Card bordered={false}>

Loading…
Cancel
Save