Skip to content

Commit

Permalink
Close:#4
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Jul 7, 2018
1 parent b1f8b52 commit 9c432a2
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 67 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"umi-plugin-dll": "^0.2.1",
"umi-plugin-dva": "^0.7.3",
"umi-plugin-routes": "0.1.4",
"umi-plugin-polyfill": "^0.1.0"
"umi-plugin-polyfill": "^0.1.0"
},
"dependencies": {
"@antv/data-set": "^0.8.7",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Forms/StepForm/Step1.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Step1 extends React.PureComponent {
type: 'form/saveStepFormData',
payload: values,
});
dispatch(routerRedux.push('/form/step-form/confirm'));
dispatch(routerRedux.push('/Forms/StepForm/Step2'));
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Forms/StepForm/Step2.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Step2 extends React.PureComponent {
const { form, data, dispatch, submitting } = this.props;
const { getFieldDecorator, validateFields } = form;
const onPrev = () => {
dispatch(routerRedux.push('/form/step-form'));
dispatch(routerRedux.push('/Forms/StepForm'));
};
const onValidateForm = (e) => {
e.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Forms/StepForm/Step3.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Step3 extends React.PureComponent {
render() {
const { dispatch, data } = this.props;
const onFinish = () => {
dispatch(routerRedux.push('/form/step-form'));
dispatch(routerRedux.push('/Forms/StepForm'));
};
const information = (
<div className={styles.information}>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Forms/StepForm/_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export default class StepForm extends PureComponent {
const { pathname } = location;
const pathList = pathname.split('/');
switch (pathList[pathList.length - 1]) {
case 'info':
case 'Step1':
return 0;
case 'confirm':
case 'Step2':
return 1;
case 'result':
case 'Step3':
return 2;
default:
return 0;
Expand Down
59 changes: 0 additions & 59 deletions src/pages/Forms/StepForm/index.js

This file was deleted.

7 changes: 6 additions & 1 deletion src/pages/_routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"exact": true,
"redirect": "/Forms/BasicForm"
},
{
"path": "/Forms/StepForm",
"exact": true,
"redirect": "/Forms/StepForm/Step1"
},
{
"path": "/List",
"exact": true,
Expand All @@ -34,4 +39,4 @@
"exact": true,
"redirect": "/Exception/403"
}
]
]

0 comments on commit 9c432a2

Please sign in to comment.