Unknown custom element: <...> - did you register the component correct?
之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了。组件的名称、import的路径都没任何问题,发现这是因为组件name填写不规范所导致的。
在定义组件的时候我们要严格按照官方文档要求来做,官方文档给出了两种组件的命名方式,即kabab-case和PascalCase。
1、kebab-case
Vue.component('my-component-name', { /* ... */ })
使用 kebab-case (短横线分隔命名) 定义一个组件时,也必须在引用这个自定义元素时使用 kebab-case,例如 <my-component-name>。
2、PascalCase
Vue.component('MyComponentName', { /* ... */ })
当使用 PascalCase (首字母大写命名) 定义一个组件时,在引用这个自定义元素时使用 <my-component-name> 或 <MyComponentName>。
Unknown custom element: <...> - did you register the component correct?的更多相关文章
- vue components registration & vue error & Unknown custom element
vue components registration & vue error & Unknown custom element vue.esm.js:629 [Vue warn]: ...
- vue报错[Vue warn]: Unknown custom element: <router-Link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
vue浏览器报错,如下 vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-Link> - di ...
- [Vue warn]: Unknown custom element: <sapn> - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in ---> <Evaluate> at src/views/index/
关于vue报错: [Vue warn]: Unknown custom element: <sapn> - did you register the component correctly ...
- Vue报错之" [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component correctly? For recursive components, make sure to provide the "name" option."
一.报错截图 [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component corre ...
- 使用vue.js路由踩到的一个坑Unknown custom element
在配合require.js使用vue路由的时候,遇到了路由组件报错: “vue.js:597 [Vue warn]: Unknown custom element: <router-link&g ...
- (错误记录)Vue: Unknown custom element
错误: vue.js:634 [Vue warn]: Unknown custom element: <ve-pie> - did you register the component c ...
- 使用el-dialog时,报错“Unknown custom element:<el-dialog> did you register the component correctly?...make sure to provide the 'name' option”
初学vue时,曾遇到一个无语的问题,在用el-dialog时一直显示没有导入,结果发现是因为没有把element ui引入到项目里. 需进行以下步骤: 1.执行: npm install elemen ...
- Unknown custom element: <componentName> - did you register the component correct?
最近开发的时候遇见一个头疼的事情,之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了. 组件的名称.import的路径都没任何问题,看了其他人遇到的问题和官方文档关于组件name属性的 ...
- Vue报错——Unknown custom element: <shop-slide> - did you register the component correctly?
参考: https://blog.csdn.net/jiangyu1013/article/details/85676292 解决:除了import组件外,还要在components中添加 <t ...
随机推荐
- 实战-加密grub防止黑客通过单用户系统破解root密码
基于Centos8进行grub加密 加密grub 实战场景:给grub加密,不让别人通过grub进入单用户. 使用grub2-mkpasswd-pbkdf2创建密文 [root@localhost ~ ...
- 图解 Redis | 不就是 AOF 持久化嘛
AOF 日志 试想一下,如果 Redis 每执行一条写操作命令,就把该命令以追加的方式写入到一个文件里,然后重启 Redis 的时候,先去读取这个文件里的命令,并且执行它,这不就相当于恢复了缓存数据了 ...
- SystemVerilog 激励发生器
simulator(激励发生器) 主要来的职责是模拟与DUT相邻设计的接口协议,只需要关注如何模拟接口信号,时期能够以真实的接口协议来发送激励给DUT. simolator不应该违反协议,但是不约束于 ...
- 启动dubbo消费端过程提示No provider available for the service的问题定位与解决
文/朱季谦 某次在启动dubbo消费端时,发现无法从zookeeper注册中心获取到所依赖的消费者API,启动日志一直出现这样的异常提示 Failed to check the status of t ...
- vue相关面试知识点总结
vue v-for循环中为什么要用key?为什么index不能作为key? key 的特殊 attribute 主要用在 Vue 的虚拟 DOM 算法,在新旧 nodes 对比时辨识 VNodes.如 ...
- 浅析IOC 和 DI
学习过spring框架的人一定都会听过Spring的IoC(控制反转) .DI(依赖注入)这两个概念,对于初学Spring的人来说,总觉得IoC .DI这两个概念是模糊不清的,是很难理解的,今天和大家 ...
- anaconda同时集成Python2 和 Python3
参考帖子,亲测有效: 利用anaconda同时使用python2和python3的方法 注意:最后一步是再对应的python环境中输入:conda install anaconda
- The Superego 实验四 团队作业1:软件研发团队组建
项目 内容 课程班级博客链接 班级博客链接 这个作业要求链接 作业要求链接 团队名称 The Superego 团队的课程学习目标 (1)组建团队,建设团队文化,申请开通团队博客 (2)团队之间相互协 ...
- 模糊视频帧插值:CVPR2020论文点评
模糊视频帧插值:CVPR2020论文点评 Blurry Video Frame Interpolation 论文链接:https://arxiv.org/pdf/2002.12259.pdf 摘要 现 ...
- 错误档案2:MySQL8.0连接C3P0的问题
>>>跳过BB,空降正文<<< 目录 前言 问题出现 解决方法 结论 前言 大家好呀,我是 白墨,一个热爱学习与划水的矛盾体. 前两天在使用C3P0连接池时遇到问题 ...