【ts项目报错】Extraneous non-props attributes

67 阅读1分钟

报错信息如下:

Extraneous non-props attributes (query, text, items, decorationNode, clientRect) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.

原因及解决方法:

template标签下只允许存在一个根标签,modal也不行,将所有代码使用一个大的标签包住即可