[Vue warn]: Unknown custom element: did you register the component correctly?
前言
[Vue warn]: Unknown custom element: did you register the component correctly? For recursive components, make sure to provide the "name" option.
问题原因是:使用了相关组件,但没有引入
解决思路
首先找出引起报错的相关代码,查看有没有使用类似组件,例如使用了 radio-group 和 radio组件,但是没有引入,这时候就会出现上面的错误
<el-form-item label="状态:">
<el-radio-group v-model="formData.status">
<el-radio :key="item.value"
:label="item.value"
v-for="item in statusOptions" >{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
在项目目录中找到 main.js,然后 import {} from引入相关组件,再 Vue.use()使用即可,例如:
import {
Radio,
RadioGroup,
} from 'element-ui';
Vue.use(Radio);
Vue.use(RadioGroup);
这样就完成了组件的全局引入
[Vue warn]: Unknown custom element: did you register the component correctly?的更多相关文章
- 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 warn]: Unknown custom element: <terminal-process> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Vue组件注册报错问题 import 不要加{},排查出如果页面引用单个组件的时候不要加上{}中括号,引入多个组件时才能派上用场,中括号去除问题即可解决.
- Unknown custom element: <...> - did you register the component correct?
之前用过的组件没有出现过任何问题,但偏偏在其他目录下引用就出问题了.组件的名称.import的路径都没任何问题,发现这是因为组件name填写不规范所导致的. 在定义组件的时候我们要严格按照官方文档要求 ...
- vue components registration & vue error & Unknown custom element
vue components registration & vue error & Unknown custom element vue.esm.js:629 [Vue warn]: ...
- 使用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 ...
- 使用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 warn]: Cannot find element: #main
使用vue框架的时候,如果页面提示如下错误,则说明new Vue的时候没有传入 el 的值: [Vue warn]: Cannot find element: #main 我们传入el 既可以,如: ...
随机推荐
- Qt/C++音视频开发49-推流到各种流媒体服务程序
一.前言 最近将推流程序完善了很多功能,尤其是增加了对多种流媒体服务程序的支持,目前支持mediamtx.LiveQing.EasyDarwin.nginx-rtmp.ZLMediaKit.srs.A ...
- Qt编写可视化大屏电子看板系统25-模块3设备监控
一.前言 设备监控主要用来实时监测制造零件等使用的设备的工作运行状态,每个设备都有对应的需要.分组名称.分组编号.设备名称.文字1.文字2.工作状态(1-开机 2-待机 3-维护 4-空),不同的工作 ...
- JS-正则表达式(基本语法、test、exec、\d\D\w\W\s\S .)
二,正则表达式 1,什么是正则表达式 是一种规范,对字符串格式进行验证的规范 不用自己写,常用的正则表达式,网上都有,只要会使用就可以 2,定义方法 字面量 var reg = /正则表达式/ 常用方 ...
- IDEA中导入其它由Maven管理的java web项目并运行,提示“Error:(3, 38) java: 程序包org.springframework.stereotype不存在”问题的解决
现象描述: IDEA中导入其它由Maven管理的java web项目并运行,提示"Error:(3, 38) java: 程序包org.springframework.stereotype不 ...
- Vue数据更新不渲染页面的问题
一. 问题现象 在通过数组下标的方式修改集合元素,元素的值确实是更新了,但是页面不能重新渲染. 二. 原因分析 Vue官方文档传送门 三. 解决方案 // 针对数组使用 this.$set(arr,i ...
- cmake-4
cmake-4学习,参考 cmake构建c++项目快速入门2-1 cmake构建c++项目快速入门2-2 了解 cmake的工作原理: Windows下用cmake编译cmake (1)先下载cmak ...
- Shiftdel walkthrough Intermediate
点击查看代码 nmap -p- -A 192.168.167.174 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-11-12 00:09 UT ...
- manim边学边做--时针方向变换
今天介绍的两个动画类ClockwiseTransform和CounterclockwiseTransform, 用于将某一个元素按照时针方向变换为另一个对象. ClockwiseTransform:将 ...
- 六. Redis当中的“发布” 和 “订阅” 的详细讲解说明(图文并茂)
七. Redis 当中 Jedis 的详细刨析与使用 @ 目录 七. Redis 当中 Jedis 的详细刨析与使用 1. Jedis 概述 2. Java程序中使用Jedis 操作 Redis 数据 ...
- Q:LISTAGG()函数用法笔记(oracle)
.LISTAGG()函数作为普通函数使用时就是查询出来的结果列转为行 ☆LISTAGG 函数既是分析函数,也是聚合函数有两种用法:1.分析函数,如: row_number().rank().dense ...