react+dva+antd/antd-mobile

github倉庫pc: https://github.com/llcMite/react-dva-antd.gitcss

github倉庫mobile:https://github.com/llcMite/react-dva-antd-mobile.gitreact

1)安裝dva-cli及建立應用git

    npm install dva-cli -ggithub

   dva new demonpm

   cd demobabel

   npm installantd

   npm startreact-router

2) 安裝antd(若是是移動端antd-mobile)ide

   npm install antd --save     ui

   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

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息