之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了。组件的名称、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. dstat命令

    dstat命令 dstat命令是一个用来替换vmstat.iostat.netstat.nfsstat和ifstat这些命令的工具,是一个全能系统信息统计工具.与sysstat相比,dstat拥有一个 ...

  2. MyBatis 各种参数传递方式

    MyBatis参数传递方式 情况一:Mapper映射器接口方法参数只有一个且为基本类型 接口方法: public List<UserEntity> selectUserByAge(int ...

  3. 几种新的MCU开发环境和语言

    https://kuaibao.qq.com/s/20171108A0LQST00?refer=kb_news 桥大学数学科学中心的Damien P. George在研究各种深奥数学.物理问题之余,还 ...

  4. Python 递归函数详解

    递归函数的概念: 直接或间接的调用自身的函数,称为递归函数. 每调用一次自身,相当于复制一份该函数,只不过参数有变化,参数的变化,就是重要的结束条件 下面是一个递归函数的实例: #coding=utf ...

  5. element-ui 的el-select如何不显示value,显示value对应的label值

    有时根据需要,我们根据v-model的值绑定option, 想要的效果: 实际的效果: 原因: value的格式存在问题,数据库读取到的数据不一定为number类型,需要手动转换. 第一种 <t ...

  6. 基于Jira的运维发布平台的设计与实现

    作者:乔克 公众号:运维开发故事 上线发布是运维的日常工作,常见的发布方式有: 手动发布 Jenkins发布平台 Gitlab CI ...... 除此之外还有需要开源软件,他们都有非常不错的发布管理 ...

  7. Jmeter(四十八) - 从入门到精通高级篇 - Jmeter监控服务器性能(详解教程)

    1.简介 JMeter是一款压力.接口等等的测试工具,Jmeter也可以像loadrunner一样监控服务器CPU.内存等性能参数,用来监控服务器资源使用情况,不过需要安装一些插件.JMeter正常自 ...

  8. Apple Xcode 12.5 (12E262) 正式版发布 - 构建 Universal App

    请访问原文链接:https://sysin.org/article/apple-xcode-12/,查看最新版.转载请保留出处. Xcode 12 简介 Xcode 12 采用全新设计,在 macOS ...

  9. 用golang刷LeetCode

    用golang刷LeetCode 用Go语言刷LeetCode记录,只是为了练习Go语言,能力有限不保证都是最优解,只能在此抛转引玉了. 数据结构和算法 数据结构和算法是程序员的命根子,没了命根子也就 ...

  10. i.MX6UL: i.MX 6UltraLite处理器 - 低功耗,安全,Arm® Cortex®-A7内核

    i.MX6UL: i.MX 6UltraLite处理器 - 低功耗,安全,Arm Cortex-A7内核 概述 MX6UltraLite作为i.MX6系列的扩展,一系列高性能.超高效的处理器,采用先进 ...