1👍
no need for the $emit since you are not listening to the emitted event anywhere. I guess looking at your question your requirement needs the mixin mechanism to call the toggle method of your modal.vue.
just below the
components: {
ModalWindow
}
in your app.vue add the line
mixins: [ModalWindow]
and add the below line in your toggleModal method
this.toggle();
just below the this.show line. You can also remove the ModalWindow from the components object if mixins work.
- [Vuejs]-How do I capture screenshots of browser using JavaScript?
- [Vuejs]-How do I fix a library add error in vue.js
Source:stackexchange.com