四、Antd组件扩展
注意:先安装扩展,在安装antd框架,否则会提示
一、安装扩展
1、组件 dva
查看项目依赖
原因是我全局安装,依赖为空,
npm i dva
查看依赖
cli装global
当访问报错:
Warning: Please use require("history").createHashHistory
instead of require("history/createHashHistory")
. Support for the latter will be removed in the next major release.
node_modules=>dva包=>lib文件夹=>index.js
代码如下:
//var _createHashHistory = _interopRequireDefault(require("history/createHashHistory")); var _createHashHistory = _interopRequireDefault(require("history").createHashHistory);
记得重启服务
2、过渡组件 dva-loading
1、1安装
npm install dva-loading --save
点到为止