解决报错did you register the component correctly? For recursive components, make sure to provide the “na

简介: 解决报错did you register the component correctly? For recursive components, make sure to provide the “na

vue.esm.js:5105 [Vue warn]: Unknown custom element: <组件名称> - did you register the component correctly? For recursive components, make sure to provide the "name" option.



如果遇到递归式调用组件,比如说A组件调用了B组件,B组件调用了C组件,C组件又调用了A组件之类的,所以需要将import引入改为components内部引入:


...
 
  components: {
    组件名称: (d) => import("@/vue/components/xxx/组件名称"), //解决递归加载组件报错
  },
 
...


相关文章
|
1月前
|
JavaScript
Property “selectedItemIndex“ was accessed during render but is not defined on instance. 报错解决
Property “selectedItemIndex“ was accessed during render but is not defined on instance. 报错解决
291 0
|
14天前
|
Java
You may wish to exclude one of them to ensure predictable runtime behavior
You may wish to exclude one of them to ensure predictable runtime behavior
17 1
|
1月前
ProcessViewer组件没有加载的问题,提示For recursive components, make sure to provide the “name“
ProcessViewer组件没有加载的问题,提示For recursive components, make sure to provide the “name“
23 0
|
1月前
|
JavaScript 前端开发
ESLint—— Failed to load config “standard“ to extend from
ESLint—— Failed to load config “standard“ to extend from
29 0
|
1月前
Classic mode for store/ is deprecated and will be removed in Nuxt 3
Classic mode for store/ is deprecated and will be removed in Nuxt 3
68 0
|
10月前
|
虚拟化
成功解决Failed to execute stage ‘Setup validation’: Hardware does not support virtualization.
成功解决Failed to execute stage ‘Setup validation’: Hardware does not support virtualization.
|
1月前
|
编解码 JavaScript 编译器
【Vue warn】If this is a native custom element, make sure to exclude it from component resolution ……
【Vue warn】If this is a native custom element, make sure to exclude it from component resolution ……
|
6月前
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
|
10月前
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages