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