I assume that what you are trying to do is not necessary or not right. If you want to call the function defined in the parent element each time the child component is clicked, you can simply wrap the component in the element and associate the event with this wrapper. Thus, the function will fire whenever you click whichever component is displayed inside it, and you will not have events related directly to the components
<div class="wrapper" v-for="component in components" @click="myFunction(component.id)">
<component :is="component.type"/>
</div>
That should do it.
source
share