Vue3.x属性继承报错解决
编写vue组件的时候莫名报了下面的警告:[Vue warn]: Extraneous non-props attributes (border, style) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
·
编写vue组件的时候莫名报了下面的警告:
[Vue warn]: Extraneous non-props attributes (border, style) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.at xxxx(发生问题的组件位置)at ...
解决:
在自定义组件上添加了border、style属性,而自定义组件内部又未去接收,因此警告了。
所以,要么在组件内部加上属性接收。如果是在第三方库UI库的话,建议直接去掉这些属性。
更多推荐



所有评论(0)