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 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>
二.分析可能的原因
import语句导入组件时from后面的路径写错
注册组件时括号内的组件名称写错,与import声明的不一致
注册组件关键字components写错导致无法使用
使用组件时名称写错,与注册组件的名字不一致
使用组件时没有使用 / 反斜杠结尾
标签中包含大写
三.解决方案(我的问题代码)
标签中包含大写

Vue报错之" [Vue warn]: Unknown custom element: <wzwzihello> - did you register the component correctly? For recursive components, make sure to provide the "name" option."的更多相关文章
- 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 warn]: Unknown custom element: <terminal-process> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Vue组件注册报错问题 import 不要加{},排查出如果页面引用单个组件的时候不要加上{}中括号,引入多个组件时才能派上用场,中括号去除问题即可解决.
- 使用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 ...
- Vue报错——Unknown custom element: <shop-slide> - did you register the component correctly?
参考: https://blog.csdn.net/jiangyu1013/article/details/85676292 解决:除了import组件外,还要在components中添加 <t ...
- 使用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报错之"[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 ...
- 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 ...
随机推荐
- Linux中 du (详解)、 df (详解)和 free(详解)以及它们的区别
转至:https://blog.csdn.net/qq_19167629/article/details/80915834?utm_medium=distribute.pc_relevant_t0.n ...
- 列表视图ListView
依然是一个listView的Java文件 1 public class ListViewActivity extends Activity { 2 private ListView lv1; 3 @O ...
- winform中更新UI控件的方案介绍
这是一个古老的话题...直入主题吧! 对winfrom的控件来说,多线程操作非常容易导致复杂且严重的bug,比如不同线程可能会因场景需要强制设置控件为不同的状态,进而引起并发.加锁.死锁.阻塞等问题. ...
- lavarel 框架 搜索后分页
................框架控制器 public function list(Request $request){ $word=$request->input('word'); $arr ...
- laravel 框架 知识点
get 方法返回一个包含 Illuminate\Support\Collection 实例的结果,其中每一条记录都是 PHP stdClass 对象的一个实例.你可以通过对象属性的方式来获取每个字段的 ...
- Control Flow in Tensorflow TF中的控制流解析
写在前面 本文翻译自Tensorflow团队的文章Tensorflow Control Flow Implementation,部分内容加入了笔者自己的理解,如有不妥之处还望各位指教. 目录 概览 控 ...
- spring源码干货分享-对象创建详细解析(set注入和初始化)
记录并分享一下本人学习spring源码的过程,有什么问题或者补充会持续更新.欢迎大家指正! 环境: spring5.X + idea 建议:学习过程中要开着源码一步一步过 Spring根据BeanDe ...
- pandas常用操作详解——pd.concat()
concat函数基本介绍: 功能:基于同一轴将多个数据集合并 pd.concat(objs, axis=0, join='outer', join_axes=None, ignore_index=Fa ...
- Redis pub/sub
list 类型, lpush + rpop 或 lpush + brpop 用作消息队列时,消息只能消费一次,且不支持多个消费者(消息只能消费一次),并且在客户端崩溃时容易丢失消息.而 pub/sub ...
- SpringBoot 中实现跨域的几种方式
一.为什么会出现跨域问题 出于浏览器的同源策略限制.同源策略(Sameoriginpolicy)是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,则浏览器的正常功能可能都会受到影响. ...