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

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

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

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

<script setup>

参考:

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

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>