vue3 defineEmits的用法
import { defineEmits } from 'vue'
//定义emit 类型
interface EmitsType {
(e: 'bClick', item: {name:string,age:number}): void
}
const emit = defineEmits<EmitsType>()
const bClick = (item: {name:string,age:number}): void => {
emit('bClick', item)
}