全局安装elementUI
在终端运行命令'npm i element-ui -S'
![](https://i-blog.csdnimg.cn/blog_migrate/8ebc9d345f32a6ca9598ffa25b2a589a.png)
2.在main.js里引入elementui
//引入
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//使用
Vue.use(ElementUI)
3.在项目中使用
在element官网里找一个组件放到项目里使用,出现效果就是全局引入使用成功了
<el-button type="primary">主要按钮</el-button>