vue3 + element-plus + vite 注意事项
vue3发布以来很多ui库都做了跟进,比如vant、ant、element…各个项目还在探索阶段,所以如果使用的话得做好迎接各个库bug的准备~
element-plus
原element库很久很久没有人维护了,不知道这个element-plus会维护多久。
安装啥的步骤element-plus网站都有。
需要注意的是,按需引用时记得引入样式文件import 'element-plus/lib/theme-chalk/index.css';
按需引入的全局size
设置:app.config.globalProperties.$ELEMENT = { size: 'small', zIndex: 3000 }
。
Uncaught SyntaxError: Cannot use import statement outside a module
<script type="module" src="/src/main.ts"></script>
根目录下的index.html