在最新构建Vue项目时导入element就报错,通过使用旧代码解决
将main.js中
main.js
createApp(App).mount('#app')
替换为
new Vue({ el:'#app' })
即可运行,同时要导入Vue import Vue from 'vue'
import Vue from 'vue'