安装
$ npm i element-ui -S
安装成功后
package.json会出现"elemen-ui":"^2.4.7"
或者其他版本也是一样的

node_modules会出现element-ui这个文件夹

在main.js引入6,7,10行

import ElementUI from "element-ui"
import "element-ui/lib/theme-chalk/index.css"
Vue.use(ElementUI)
这样就可以开始使用element-ui了
element-ui样式可以参考官网http://element-cn.eleme.io/#/zh-CN/component/installation
网友评论