I\'m using the VueJS Vuetify framework and I need to open a dialog - that gets imported as a component template - from another template. Once the Menu butto
The most simpler way I found to do it is:
in data() of component, return a attribute, let's say, dialog.
When you include a component, you can set a reference to your component tag. E.g.:
import Edit from '../payment/edit.vue';
Then, inside my component, I have set a method:
open: function () {
var vm = this;
vm.dialog = true;
}
Finally, I can call it from parent, using:
editar(item)
{
var vm = this;
vm.$refs.edit_reference.open();
}