import React, { PureComponent, Fragment } from 'react'; import { Card, Steps } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; import styles from '../style.less'; // import { Route, Redirect, Switch } from 'dva/router'; // import { getRoutes } from '../../../utils/utils'; const { Step } = Steps; export default class StepForm extends PureComponent { getCurrentStep() { const { location } = this.props; const { pathname } = location; const pathList = pathname.split('/'); switch (pathList[pathList.length - 1]) { case 'Step1': return 0; case 'Step2': return 1; case 'Step3': return 2; default: return 0; } } render() { const { location, children } = this.props; return ( {children} {/* {getRoutes(match.path, routerData).map(item => ( ))} */} ); } }