安装:
npm i element-theme-default -S
main.js
增加
import ElementUI from 'element-ui' import 'element-ui/lib/theme-default/index.css' import router from './router'
但是一直:
This dependency was not found: * element-ui/lib/theme-default/index.css in ./src/main.js To install it, you can run: npm install --save element-ui/lib/theme-default/index.css
行吧,那我就
npm install --save element-ui/lib/theme-default/index.css
but....
一直Error,从未结束:
然后,
百度......
知乎......
segmentfault......
最后,去node_module那里找element-ui/lib/theme-default/index.css
找不到,找到了element-ui/lib/theme-chalk/index.css
于是,我把main.js的
import 'element-ui/lib/theme-default/index.css'
换成了
import 'element-ui/lib/theme-chalk/index.css'
成功。