react+dva+antd/antd-mobile

github仓库pc: https://github.com/llcMite/react-dva-antd.git

github仓库mobile:https://github.com/llcMite/react-dva-antd-mobile.git

1)安装dva-cli及创建应用

    npm install dva-cli -g

   dva new demo

   cd demo

   npm install

   npm start

2) 安装antd(如果是移动端antd-mobile)

   npm install antd --save     

   npm install babel-plugin-import --save

   编辑 .roadhogrc,使babel-plugin-import按需加载插件生效

"extraBabelPlugins": [
     "transform-runtime",
     ["import", { "libraryName": "antd", "style": "css" }]
],

3)配置路由:https://react-guide.github.io/react-router-cn/

4)dva教程:https://www.jianshu.com/p/69f13e9123d9

 

posted @ 2018-01-11 20:02  LLC-Mite  阅读(409)  评论(0编辑  收藏  举报