报错Unknown custom element: <di> - did you register the component correctly? For recursive components,

报错Unknown custom element: <di> - did you register the component correctly? For recursive components,

百度了这个报错信息,发现出现的情况有两种,注意报错的内容,看清楚。分析了下,出现的情况进行一个总结

Unknown custom element: - did you register the ***ponent correctly? For recursive ***ponents, make sure to provide the “name” option.

这个报错是组件内有标签打错了,浏览器无法识别,需要自己去好好找下,我就是把div打成了di所以报错,找了很久。
还有一种类似的情况,但是解决起来完全不一样,这是我看的别人的方法,自己暂时还没有遇到,这种情况也要注意

报错Unknown custom element: <组件名> - did you register the ***ponent correctly?这是别人遇到并写的的原因及解决办法

1、组件名字是否写对了
2、import xxx from “./xxx.vue” 写成了import { xxx} from “./xxx.vue”/
3、代码中有两个***ponents,后一个的值把前一个覆盖了
4、组件直接循环套用了

解决(第四种)

在出现的问题中A,B两个组件,渲染A组件的时候,A组件中引入了B组

转载请说明出处内容投诉
CSS教程_站长资源网 » 报错Unknown custom element: <di> - did you register the component correctly? For recursive components,

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买