element-ui & babel-plugin-component config bug
2024-08-23 23:36:17
element-ui & babel-plugin-component config bug
vue-cli
bad
babel.config.js
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
[
"es2015",
{
"modules": false,
},
],
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk",
},
],
],
};
good
babel.config.js
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk",
},
],
],
};
main.js
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// Vue.use(ElementUI);
import { Button, Select } from 'element-ui';
// Vue.component(Button.name, Button);
// Vue.component(Select.name, Select);
/* OR */
Vue.use(Button);
Vue.use(Select);
Vue.config.productionTip = false;
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app');
https://element.eleme.io/#/en-US/component/quickstart#on-demand
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
最新文章
- Oracle介绍(初学者必须知道的)
- JAVA通过HTTP访问:Post+Get方式(转)
- java socket知识点
- quickstack is a tool to take call stack
- 小谈一下Java I/O
- java Spring 在WEB应用中的实例化
- 男装电商Bonobos融资5500万美元,计划IPO,全靠体验店战略 - 国外 - 快鲤鱼
- [转载]STL map中的一些基本函数
- 我觉得主要靠积累,难度不是问题,主要靠时间积累,以及兴趣带来的学习能力(我觉得至少5年全职Qt开发经验,才能算精通)
- MySQL迁移方案(后续再补充)
- BZOJ 3211: 花神游历各国【线段树区间开方问题】
- Node.js ZLIB
- C# Linq GroupBy 分组过滤求和
- MATLAB 通过对话框返回值选择下一步操作
- 日幣匯率 ( Node-Red 爬蟲 )
- task_payment_byonlinedown
- [bcc32 Error] ws2def.h(231): E2238 Multiple declaration for 'sockaddr'
- Hadoop源码阅读-HDFS-day1
- System.exit(0)会跳过finally块的执行
- it 删除远程分支
热门文章
- Devexpress DockManager多页面浮动窗口会关闭所有页面的问题
- Git提交代码规范 而且规范的Git提交历史,还可以直接生成项目发版的CHANGELOG(semantic-release)
- Linux常用命令:文件操作命令
- 20201104gryz模拟赛解题报告
- codevs1700 施工方案第二季
- Java8新特性_四大内置核心函数式接口
- Spark高级数据分析——纽约出租车轨迹的空间和时间数据分析
- 存储过程demo返回银行名称
- Codeforces Round #677 (Div. 3) G. Reducing Delivery Cost(dijkstra算法)
- Testing Beta Round (Unrated)