最近在把公司项目从vue2+element 升级到 vue3+elementPlus,实实在在遇到很多问题,先在把报错信息捋一捋。
1.Runtime directive used on component with non-element root node
意思是自定义指令不能放到组件上,而是要放到自有的元素上
2.element-plus icons不能用动态class的方式导入
需要做:将icons全局导入,然后用
<ElIcon>
<component :is="icon" />
</ElIcon>
的方式导入
vue 升级到vue3踩坑记录(vue和element)
于 2021-11-10 16:59:44 首次发布