安装命令

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);
完成可以测试使用
喜欢的小伙伴可以关注我的微信公众号“前端伪大叔”
vue-Elementui引入

 

 

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2021-10-16
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案