Answer the question
In order to leave comments, you need to log in
What is wrong with my event.bus in vue?
Main.js
Vue.config.productionTip = false;
export const EventBus = new Vue();
import { EventBus } from '../../../main';
EventBus.$emit("emmitTest", this.showChoose); // передаю true
import { EventBus } from '../../../main';
created() {
EventBus.$on('emmitTest', data => {
this.showChoose = data; .// это должно изменить в data showChoose на true из другого компонента,
});
},
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