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) {

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

methods: {
 click_btn: function () {

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