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 ...
随机推荐
- 攻防世界(八)web2
攻防世界系列:web2 1.代码审计 知识补充: strrev(string):反转字符串 strlen(string):字符串长度 substr(string,start,length):截取字符 ...
- suse11sp3、suse12 安装 zabbix-agent
1.添加repo源 suse11SP3zypper addrepo http://download.opensuse.org/repositories/server:/monitoring/SLE_1 ...
- nginx重定向rewrite
引入rewrite vim /etc/nginx/conf.d/mobile_pc.conf server{ listen 80; server_name www.zls.com zls.com; r ...
- Ubuntu 20.04 搭建 LAMP 环境
LAMP环境即Linux下配置Apache.Mysql.Php,话不多说 GO ! 0.下载之前先更新一波: 更新源 sudo apt-get update 更新软件 sudo apt-get upg ...
- 1.5linux用户权限相关命令
用户权限相关命令 目标 用户 和 权限 的基本概念 用户管理 终端命令 组管理 终端命令 修改权限 终端命令 01. 用户 和 权限 的基本概念 1.1 基本概念 用户 是 Linux 系统工作中重要 ...
- Django部署uwsgi 与 nginx配置
1.nginx文件的配置 路径:/etc/nginx/conf.d/ example.conf 启动:service nginx [start]/[restart]/[stop] upstream d ...
- JDK8中Stream使用解析
JDK8中Stream使用解析 现在谈及JDK8的新特新,已经说不上新了.本篇介绍的就是Stream和Lambda,说的Stream可不是JDK中的IO流,这里的Stream指的是处理集合的抽象概念『 ...
- 关于MongoDB ObjectId的那些事儿
ObjectId 是什么? 一句话,ObjectId 是 MongoDB 文档 _id(主键)的默认类型. ObjectId 的组成? ObjectId 使用 12 字节的存储空间,是一个由 24 个 ...
- 网络模型mAP计算实现代码
网络模型mAP计算实现代码 一.mAP精度计算 这里首先介绍几个常见的模型评价术语,现在假设我们的分类目标只有两类,计为正例(positive)和负例(negtive)分别是: 1)True posi ...
- TensorFlow优化器及用法
TensorFlow优化器及用法 函数在一阶导数为零的地方达到其最大值和最小值.梯度下降算法基于相同的原理,即调整系数(权重和偏置)使损失函数的梯度下降. 在回归中,使用梯度下降来优化损失函数并获得系 ...