vue-Elementui引入

安装命令

npm install --save element-ui

可以直接复制官网的引用,复制到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)
});
找到css文件 index.css
在index.html引入这个文件 \node_modules\element-ui\lib\theme-chalk/index.css文件
把里面的fonts文件也一同引入文件夹中;
引入下面语句到main.js文件
import 'element-ui/lib/theme-chalk/index.css';
 Vue.use(ElementUI);
完成可以测试使用
喜欢的小伙伴可以关注我的微信公众号“前端伪大叔”

 

 

posted @ 2019-10-20 11:22  前端伪大叔  阅读(837)  评论(0编辑  收藏  举报