vue3.0子组件emit传值给父组件报警告
记录下vue3.0中子组件使用emit传值给父组件,报以下警告runtime-core.esm-bundler.js?5c40:6871 [Vue warn]: Extraneous non-emits event listeners (getSon) were passed to component but could not be automatically inherited because
·
记录下vue3.0中子组件使用emit传值给父组件,报以下警告
runtime-core.esm-bundler.js?5c40:6871 [Vue warn]: Extraneous non-emits event listeners (getSon) 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.
解决办法如下图:
更多推荐
已为社区贡献5条内容
所有评论(0)