Vue3报错:Failed to resolve component: xx If this is a native custom element, make sure to exclude it f

Vue3报错:Failed to resolve component: xx If this is a native custom element, make sure to exclude it f

Vue3报错:Failed to resolve ***ponent: xxx
If this is a native custom element, make sure to exclude it from ***ponent resolution via ***pilerOptions.isCustomElement.

翻译:无法解析组件:xxx
如果这是本机自定义元素,请确保通过***piler Options.is Custom Element将其从组件解析中排除。

网上找了很多博客,都没有解决问题,最后发现是setup没加上

javascript"><script setup>

参考:

网上有很多出现此报错的原因是import没写对
比如 import xx from '路径'写成了import {xx} from '路径',原因是混淆了引入组件和引入组件中的方法

转载请说明出处内容投诉
CSS教程_站长资源网 » Vue3报错:Failed to resolve component: xx If this is a native custom element, make sure to exclude it f

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买