I need to call a child function from the parent but I don't know how,
This is parent component calling to child component
<QuestionC @childfunction></QuestionC>
This is a child component
methods: {
childfunction: function () {
alert('hello')
}
},
this.$root.$children, but I think it's better to usingrefto get the target component that you want.