[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视频监控系统一个诡异问题的解决思路(做梦都想不到)
一.前言 由于Qt版本众多,几百个版本之间存在不兼容的情况,为此如果要兼容很多版本,没有取巧的办法和特殊的捷径,必须自己亲自安装各个版本编译运行并测试,大问题一般不会有,除非缺少模块,小问题还是不断有 ...
- Qt安卓开发经验011-020
安卓中一个界面窗体对应一个Activity,多个界面就有多个Activity,而在Qt安卓程序中,Qt这边只有一个Activity那就是QtActivity(包名全路径 org.qtproject.q ...
- 23种设计模式实战:重学Java设计模式
23种设计模式实战PDF: 链接:https://pan.baidu.com/s/1XfjkBt19G7jZQfwk5wAV3w 提取码:1234
- linux服务器下 conda 配置清华源
安装miniconda 下载安装脚本 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Li ...
- CDS标准视图:维护策略描述 I_MaintStrategyTextData
视图名称:维护策略描述 I_MaintStrategyTextData 视图类型:基础视图 视图代码: 点击查看代码 @EndUserText.label: 'Maintenance Strategy ...
- 为了解决服务启动慢的问题,我为什么要给Apollo和Spring提交PR?
最近在整理之前记录的工作笔记时,看到之前给团队内一组服务优化启动耗时记录的笔记,简单整理了一下分享出来.问题原因并不复杂,主要是如何精准测量和分析,优化后如何定量测量优化效果,说人话就是用实际数据证明 ...
- redux初探
action是一个普通对象 里面必须有一个type字段,代表将要执行的行为,其他字段自己规划. action只是描述了将要发生的事情并不能直接修改状态 action创建函数 尽量是一个纯函数,他返回的 ...
- Air实现Go程序的热重载(热加载)
简介: air是Go的热加载工具,它可以监听文件或者目录的变化,自动编译,重启程序,提高开发的工作效率. 场景: 在代码修改后需要通过ctrl+c来停止项目,go run的方式来再次重启项目,在开发进 ...
- [记录点滴] 一个Python中实现flatten的方法
之前如果想使用flatten,一般借助于numpy.ndarray.flatten. 但是 flatten只能适用于numpy对象,即array或者mat,普通的list列表不适用. 最近找到一个轻便 ...
- [记录点滴] Spark迁移到Flink的几个点
[记录点滴] Spark迁移到Flink的几个点 0x00 三个问题点 有三个Spark API需要找到对应的Flink API或者替代方法 reduceByKeyAndWindow 函数reduce ...