Vue3 Extraneous non-props attributes (id) were passed to component but could not be automatically
Vue3 Extraneous non-props attributes (id) were passed to component but could not be automatically 警告解决
·
vue3如下警告原因
原因:1.一个组件可能有多个根节点,请确保组件在单一根节点下
2.外部组件不要直接放在template下,最外层加div包裹,如下图
更多推荐
已为社区贡献3条内容
所有评论(0)