大英网站建设工作,建设网站能盈利吗,网页设计规范,千万别在百度上搜别人名字Vue中按需引入Element-plus时#xff0c;报错TypeError: Components is not a function。
1、参考Element-plus官方文档
安装unplugin-vue-components 和 unplugin-auto-import这两款插件
2、然后需要在vue.config.js中配置webPack打包plugin配置 3、重新启动项目会报错
T…Vue中按需引入Element-plus时报错TypeError: Components is not a function。
1、参考Element-plus官方文档
安装unplugin-vue-components 和 unplugin-auto-import这两款插件
2、然后需要在vue.config.js中配置webPack打包plugin配置 3、重新启动项目会报错
TypeError: Components is not a function
解决方案 将 unplugin-auto-import 和 unplugin-vue-components这两款插件分别降低至0.16.1和0.25.2。
通过执行如下命令可解决 npm install -D unplugin-auto-import0.16.1 npm install -D unplugin-vue-components0.25.2