[Vue warn]: Method “components“ has type “object“ in the component definition. Did you reference the

简介: [Vue warn]: Method “components” has type “object” in the component definition. Did you reference the

[Vue warn]: Method “components” has type “object” in the component definition. Did you reference the

报错如下:

2345_image_file_copy_1.jpg2345_image_file_copy_2.jpg

仔细检查代码发现:components写到methods方法里面去了,被methods方法包裹住了。只需要把components代码块拿出来即可。我已解决👏👏👏👏👏

相关文章
|
5月前
|
JavaScript
报错[Vue warn]: $listeners is readonly. $attrs is readonly.怎么解决?
报错[Vue warn]: $listeners is readonly. $attrs is readonly.怎么解决?
|
27天前
|
JavaScript
vue学习(7)Object.defineProperty
vue学习(7)Object.defineProperty
31 2
|
2月前
|
XML 缓存 API
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
|
3月前
|
JavaScript 索引
Component name “index“ should always be multi-word vue/multi-word-component-names
Component name “index“ should always be multi-word vue/multi-word-component-names
|
4月前
|
JavaScript
error Component name “Login“ should always be multi-word vue/multi-word-component-names【已解决】
error Component name “Login“ should always be multi-word vue/multi-word-component-names【已解决】
151 1
|
3月前
|
JavaScript
vue 动态组件【详解】component :is
vue 动态组件【详解】component :is
224 0
|
5月前
|
JavaScript
Vue : Object.defineProperty()
Vue : Object.defineProperty()
40 2
|
5月前
Vue3 使用动态组件 component
Vue3 使用动态组件 component
|
5月前
|
JavaScript 前端开发 编译器
Vue组件(Component)
Vue组件(Component)
52 3
|
5月前
|
JavaScript 前端开发
[Vue Router warn]: Component “default“ in record with path “/xx“ is a function that does not return
[Vue Router warn]: Component “default“ in record with path “/xx“ is a function that does not return
770 0