1.出现问题:
Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the “name” option.
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5f4bc6445fd346ccdc22c176c3285f94.png)
2.分析:
尝试了好多种网上的方法,最后发现好像错误的根源不一样
![错误原因](https://i-blog.csdnimg.cn/blog_migrate/f856a40fa25e889d4fd729e0717e6ec4.png)
开始的时候我是这样注册组件的,这是错误的
3.解决
在看了好多之后才意识到没有写key值
![这样是正确的](https://i-blog.csdnimg.cn/blog_migrate/1372582aab8691ea31534022865321d0.png)
4.总结
下次使用别人封装好的组件时 要善于观察别人的代码 不要盲目使用 盲目下手
5.更新一下
在你的组件名字和注册的对应不上时,也会报这个错