在main.js里这里配置路由
render((
<Router history={hashHistory} >
<Route path="/" component={Sider}>
<IndexRoute path="myCreditCard" component={myCreditCard} />
<Route path="myOverview" component={myOverview} />
</Route>
</Router>
), document.getElementById('app'));
overview.js里是这样的:
import React from 'react'
import {Steps, Icon} from 'antd'
const Step = Steps.Step
export default class myOverview extends React.Component {
constructor(props) {
super(props)
this.state = {
tDate: [],
selectedRowKeys: []
}
}
componentDidMount() {
console.log("lail")
}
render() {
return (
<Steps>
<Step status="finish" title="借款" icon={<Icon type="heart" />} />
<Step status="finish" title="投资" icon={<Icon type="solution" />} />
<Step status="process" title="还款" icon={<Icon type="credit-card" />} />
<Step status="wait" title="完成" icon={<Icon type="smile-o" />} />
</Steps>
)
}
}
step可以显示出来,但是<Icon>却没有生成出来。也没有报错。
本来想在github上问的。可是他们说使用上的问题不能在那上面问,那里只能提bug或者pullrequest。
高手帮忙看看什么原因。
升级一下antd的版本试试