一.报错截图

[Vue warn]: Unknown custom element: <wzwzihello> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

错误代码

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue组件</title>
</head>
<body>
<div id="app">
<wzwZihello></wzwZihello>
</div> </body>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
// 自定义局部组件:临时使用
const wzwHello = {
template:"<div>大哥你好,我叫{{name}}</div>",
data(){
return {
name:"wzw"
}
}
} // 父组件:新建Vue
const app = new Vue({
el:"#app",
components:{
wzwZihello:wzwHello
}
})
</script>
</html>

二.分析可能的原因

  1. import语句导入组件时from后面的路径写错

  2. 注册组件时括号内的组件名称写错,与import声明的不一致

  3. 注册组件关键字components写错导致无法使用

  4. 使用组件时名称写错,与注册组件的名字不一致

  5. 使用组件时没有使用 / 反斜杠结尾

  6. 标签中包含大写

三.解决方案(我的问题代码)

  1. 标签中包含大写

Vue报错之" [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component correctly? For recursive components, make sure to provide the "name" option."的更多相关文章

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

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

  3. [Vue warn]: Unknown custom element: <terminal-process> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

    Vue组件注册报错问题 import 不要加{},排查出如果页面引用单个组件的时候不要加上{}中括号,引入多个组件时才能派上用场,中括号去除问题即可解决.

  4. 使用Vue自定义组件时,报did you register the component correctly? For recursive components, make sure to provide the "name" option.(未注册组件)的原因之一

    错误信息: [Vue warn]: Unknown custom element: <list> - did you register the component correctly? F ...

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

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

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

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

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

  8. Vue报错之"[Vue warn]: Invalid prop: type check failed for prop "jingzinum". Expected Number with value NaN, got String with value "fuNum"."

    一.报错截图 [Vue warn]: Invalid prop: type check failed for prop "jingzinum". Expected Number w ...

  9. Vue报错之"[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead......"

    一.报错截图 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the p ...

随机推荐

  1. 5、CPU 的线程与操作系统的线程有何关系?操作系统中的进程和线程是什么关系?

    CPU中的线程和操作系统(OS)中的线程即不同,在调度的时候又有些关联.CPU中的线程,我们叫它们Thread,和OS中的线程的名字一样.它来自同步多线程(SMT,Simultaneous Multi ...

  2. C# Task和异步方法

    本文主要参考: https://www.cnblogs.com/qtiger/p/13497807.html ThreadPool中有若干数量的线程.当有任务需要处理时,会从线程池中获取一个空闲的线程 ...

  3. WPF中ComboBox控件的SelectedItem和SelectedValue的MVVM绑定

    问题描述:左侧是一个ListView控件,用于显示User类的Name属性,右侧显示其SelectedItem的其他属性,包括Age, Address,和Category.其中Category用Com ...

  4. JavaWeb-网络编程

    Java网络编程 推荐阅读: 计算机网络:https://www.cnblogs.com/zwtblog/tag/计算机网络/ 计算机网络基础 利用通信线路和通信设备,将地理位置不同的.功能独立的多台 ...

  5. oauth2.0密码模式详解

    oauth2.0密码模式 欢迎关注博主公众号「Java大师」, 专注于分享Java领域干货文章http://www.javaman.cn/sb2/oauth-password 如果你高度信任某个应用, ...

  6. C#-使用Newtonsoft.Json实现json字符串与object对象互转

    json字符串转object对象: IF004Response processResponse = JsonConvert.DeserializeObject<IF004Response> ...

  7. 接口自动化测试框架(Java 实现)

    目录 需求分析 开发设计 分层与抽象 技术选型 主要类设计 测试文件设计 工程目录设计 工程实现 github 地址 运行示例 需求分析 需求点 需求分析 通过 yaml 配置接口操作和用例 后续新增 ...

  8. php 23种设计模式 - 命令模式

    命令模式 将一个请求封装为一个对象,从而使用户可用不同的请求对客户进行参数化.对请求排队或记录请求日志,以及支持撤销的操作. 命令模式以松散耦合主题为基础,发送消息.命令和请求,或通过一组处理程序发送 ...

  9. 25 面向对象编程 继承概念 代码 快捷键 super注意点

    继承概念 继承的本质是对某一批的抽象,从而实现对现实世界更美好的建模. extends的意思的"扩展".子类是父类的扩展. JAVA中类只有单继承,没有多继承!理解:一个儿子只能有 ...

  10. 理解HMM算法

    长这样: 理解的前提: (1)状态:生成观测值的变量(上图中的"吃"和"睡"). (2)观测值:状态乘上输出概率对应的输出(上图中的橙色节点). (3)输出概率 ...