0👍
You could use an ‘event bus’ system for communicating between components (non parent-child communication).
var bus = new Vue()
// in component A's method
bus.$emit('id-selected', 1)
// in component B's created hook
bus.$on('id-selected', function (id) {
// ...
})
Please see:
https://v2.vuejs.org/v2/guide/components.html#Non-Parent-Child-Communication
- [Vuejs]-Sorting table doesnt working Vue
- [Vuejs]-Vue Select component get value id of selected array
Source:stackexchange.com