How to call parent component function from child component in vue3
parent
1. define and return a function
const a_parent_function = (paramaters) => {
}
return {
a_parent_function
}
2. give it to the child component
<operation-list
ref="a_reference_to_child_componet_that_you_should_use_to_call_child_funcitons_or_paramaters"
:data="data"
@the_parent_function="a_parent_function"
/>
child
1. use it
setup(props, ctx) {
ctx.emit('the_parent_function', paramaters)
}