Generic dialog with an event
I have a dialog with a fixed title, content and event when pressing the ok button. It is placed as q-dialog in the template and in script as method of each vue file.
How is it possible to make it generic so it will get the content + event (or null if none), will show that content in the dialog and run the event no matter where it was called from?
I made a generic method/property that I call from different pages but is there an example where a template is also involved?
metalsadman last edited by metalsadman
@amoss try the plugin version https://quasar.dev/quasar-plugins/dialog#Introduction, as for global states, learn about vuex.
Thanks! I will try it