0👍
Using Vue’s ref directive should work for you:
<search-comp ref="search"></search-comp>
And then in your eventbus use:
var search = parent.$refs.search;
search.doSearch(val);
Here is a working demo:
https://codepen.io/egerrard/pen/vpJdQJ
And here is the documentation:
https://v2.vuejs.org/v2/api/#ref
- [Vuejs]-Overwrite Default ChartJS Variables with Webpack
- [Vuejs]-Vue.js – Disable Transitions on Child Div
Source:stackexchange.com