Hi there, I am currently facing a challenge as a newcomer to Vue. Within my project, I am using Vuetify and have a v-dialog component with a slot structured as follows:
<template>
<v-row>
<v-dialog v-model="dialog" max-width="600px">
<template v-slot:activator="{ on }">
<v-btn class="ma-3" color="info" v-on="on">{{ text }}</v-btn>
</template>
<slot></slot>
</v-dialog>
</v-row>
</template>
In this component, I plan to pass a form as the slot and hope to close the modal upon form submission. I come from a React background where I would simply pass a function to set the dialog variable to false when submitting the form within the slot. However, I am finding it challenging to achieve this in Vue. The solutions I have found online seem overly complex for such a basic task.
Any help is greatly appreciated. Thank you!