Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/437.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript VueJs使用嵌套组件并获取未知自定义元素错误_Javascript_Vue.js_Vuejs2 - Fatal编程技术网

Javascript VueJs使用嵌套组件并获取未知自定义元素错误

Javascript VueJs使用嵌套组件并获取未知自定义元素错误,javascript,vue.js,vuejs2,Javascript,Vue.js,Vuejs2,定义一些组件并在页面内使用后,例如: ... ... ... ... 定义为类别树视图和类别列表视图的组件都可以正常工作,现在我想用另一个组件(如类别)来包装它们,例如: 。。。 这里我得到了这个错误: [Vue warn]: Unknown custom element: <categories-tree-view> - did you register the component correctly? For recursive component

定义一些组件并在页面内使用后,例如:


...
...
... ...
定义为
类别树视图
类别列表视图
的组件都可以正常工作,现在我想用另一个组件(如
类别
)来包装它们,例如:

。。。
这里我得到了这个错误:

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

found in

---> <Categories>
       <Root> app.js:833:15
[Vue warn]: Unknown custom element: <categories-list-view> 
- did you register the component correctly? For recursive components, 
make sure to provide the "name" option.

您需要在“类别”组件中导入它们,或使用插槽