记录下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.

解决办法如下图:

 

 

 

Logo

前往低代码交流专区

更多推荐