1.父组件
<addoredit ref="addoreditREF" @onSure="add_onSure"/>
private add_onSure(data, key) {
//内容操作
}
2.子组件
@Emit('onSure')
private onSure(data: any, key: any) {}
子组件中事件(){
this.onSure(要传的值, 要传的值)
}
TS中使用@emit子传父
于 2023-09-15 14:53:57 首次发布