Answer the question
In order to leave comments, you need to log in
Is it possible to implement an event bus based on import, Vue 3 cli?
Hello, I have several pages with many components (different pages can have the same function names) can I make each page an event bus where each component can receive and emit an event to the page.
On Vue 2, I implemented this with
//main.js
global.context = new Object();
global.context.app = app;
//к примеру одна из страниц
global.context.authorization = this;
//в каком либо компоненте страницы емиттил
global.context.authorization.$emit(
"authorizationMessage",
this.t("Password fields didn't match")
);
//и таким же образом онил
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question