安装
网址:Element - The world's most popular Vue UI framework
在项目处使用cmd
npm i element-ui -S
安装速度太慢可使用淘宝镜像源:
Ctrl+c//取消现行程序
npm set registry https://registry.npm.taobao.org/
npm config get//查验修改结果是否成功
引入
在main.js中
写入以下内容(可选一)
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue';
Vue.use(ElementUI);
new Vue({
el: '#app',
render: h => h(App)
});
我使用的是 (可选二)
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI,{size:"small"});
具体使用可参考官方教程。。。