antd单页面应用里<step>组件图标不显示

在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。
高手帮忙看看什么原因。

阅读 6.5k
2 个回答

升级一下antd的版本试试

信息不够详细啊...
1、看下控制台 network里面是否有请求失败的情况;
2、其他用到Icon的组件,是否也不能正常显示?如果不能,说明很可能是webpack的配置有问题~

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题