How to design vue global events?

  node.js, question

Now my approach is to set an event in the root component

'broadcast_event':function (event_name,data) {
 this.$broadcast(event_name,data)
 bracket

The event is then triggered at the descendant component to broadcast the event for all components

methods: {
 click_btn: function () {
 this.$dispatch("broadcast_event","click_tag")
 },
 bracket

Is there a better way?

what isGlobal event? What do you want to do, can you give an example of what is a local event and what is a global event?

If messages need to be passed between multiple components, i.e. variables that have common operations, changes must be made in response to changes in one place and another, then use thevuex