I want to open a dialog on a button click. But i need logic to be executed before and after this event. How can this be done?
What i have tried:
template
<v-dialog v-model="dialog" width="400">
<template v-slot:activator="{ on }">
<v-btn color="primary" @click="openDialog">Dialog</v-btn>
</template>
<v-btn>lol</v-btn>
</v-dialog>
script
data() {
return { dialog: false };
},
methods: {
openDialog() {
this.dialog = true;
}
}
}
This seems like a bad fix because after all the v-slot on is still there.