之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了。组件的名称、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?的更多相关文章

  1. vue components registration & vue error & Unknown custom element

    vue components registration & vue error & Unknown custom element vue.esm.js:629 [Vue warn]: ...

  2. 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 ...

  3. [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 ...

  4. 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 ...

  5. 使用vue.js路由踩到的一个坑Unknown custom element

    在配合require.js使用vue路由的时候,遇到了路由组件报错: “vue.js:597 [Vue warn]: Unknown custom element: <router-link&g ...

  6. (错误记录)Vue: Unknown custom element

    错误: vue.js:634 [Vue warn]: Unknown custom element: <ve-pie> - did you register the component c ...

  7. 使用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 ...

  8. Unknown custom element: <componentName> - did you register the component correct?

    最近开发的时候遇见一个头疼的事情,之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了. 组件的名称.import的路径都没任何问题,看了其他人遇到的问题和官方文档关于组件name属性的 ...

  9. Vue报错——Unknown custom element: <shop-slide> - did you register the component correctly?

    参考: https://blog.csdn.net/jiangyu1013/article/details/85676292 解决:除了import组件外,还要在components中添加 <t ...

随机推荐

  1. [rhel-media] :Yum软件仓库唯一标识符,避免与其他仓库冲突。

    第1步:进入到/etc/yum.repos.d/目录中(因为该目录存放着Yum软件仓库的配置文件). 第2步:使用Vim编辑器创建一个名为rhel7.repo的新配置文件(文件名称可随意,但后缀必须为 ...

  2. Linux_权限管理理论概述

    一.权限定义 1.文件权限作用的对象 owner :属主 - u group :属组 - g other :其他人 - o 2.文件的三种权限 //针对文件的权限 r 可读 可以使用cat命令查看文件 ...

  3. 用urllib库几行代码实现最简单爬虫

    """ 使用urllib.request()请求一个网页内容,并且把内容打印出来. """ from urllib import reque ...

  4. 云计算OpenStack---虚拟机获取不到ip(12)

    一.现象描述 openstack平台中创建虚拟机后,虚拟机在web页面中显示获取到了ip,但是打开虚拟机控制台后查看网络状态,虚拟机没有ip地址,下图为故障截图: 二.分析 1.查看neutron服务 ...

  5. Linux进阶之进程管理

    本节内容 1.进程管理 2.ps 3.uptime 4.top 5.ss -tnl------ lsof -i :22 一. 进程管理的概念 程序:二进制文件,静态 /bin/date,/usr/sb ...

  6. Java中生成唯一标识符的方法(Day_48)

    有时候业务需要生成唯一标识符,但又不能依赖于数据库中自动递增的字段产生唯一ID,比如多表同一字段需要统一一个唯一ID,此时我们就需要用程序来生成一个唯一的全局ID. UUID UUID是指在一台机器上 ...

  7. 从Lombok到JSR-269

    前言 Lombok的出现帮助开发人员在开发工程中消除了大部分冗余代码:繁琐的get.set方法甚至建造者模式. Lombok的实现方式是什么呢? 新建一个测试类使用Lombok的Getter和Sett ...

  8. IDEA中怎么创建ini文件

    首先博主在这使用的是idea的2019.3.2的版本,不知道的话可以打开help菜单的about查看 第一步: 具体需要在setings安装ini插件 第二步: 在File Types中查看ini,没 ...

  9. SQL SERVER常用语法记录

    用于记录SQL SERVER常用语法,以及内置函数. 以下语句包含: WITH 临时表语法 ROW_NUMBER()内置函数,我一般主要是用来分页.针对于查出来的所有数据做一个数字排序 分页的BETW ...

  10. CodeGen融合核心关系循环扩展

    CodeGen融合核心关系循环扩展 Expansion Tokens <HARMONYCORE_RELATION_NAME> 插入当前关系的名称.关系名称将自动生成,但可以由Harmony ...