首页 前端知识 【vue警告】[Vue warn]: Extraneous non-props attributes (class) were passed to component but could

【vue警告】[Vue warn]: Extraneous non-props attributes (class) were passed to component but could

2024-06-10 23:06:49 前端知识 前端哥 724 3 我要收藏
报错内容 

[Vue warn]: Extraneous non-emits event listeners (refreshRelationList) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option. 

翻译:

无关的非发出事件侦听器(refreshRelationList)被传递给组件,但不能自动继承,因为组件呈现片段或文本根节点。如果侦听器只打算作为组件自定义事件侦听器,则使用"emit "选项声明它。

报错原因/解决方法

1.没有通过defineEmits(["refreshRelationList"])定义。

2.该子组件中存在多个根节点。(改为一个)

转载请注明出处或者链接地址:https://www.qianduange.cn//article/11837.html
标签
评论
发布的文章

第一次实验补充

2024-06-18 09:06:14

html5shiv,从入门到深入

2024-05-09 10:05:07

html5基础入门

2024-06-18 09:06:07

HTML5学习简记

2024-06-18 09:06:20

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!