Reputation: 15
I am using Vue.js and Vuetify and i am having trouble in closing a dialog box.
i have set a dialog = ''
and altering the value on method using this.dialog = false.
<v-dialog v-model="dialog" persistent max-width="600px">
<template v-slot:activator="{ on }">
<v-btn color="primary" dark v-on="on">Open Dialog</v-btn>
</template>
<v-card>
<v-card-actions>
<div class="flex-grow-1"></div>
<v-btn color="blue darken-1" text @click="dialog = false">Close</v-btn>
<v-btn color="blue darken-1" text @click="save">Save</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
Upvotes: 1
Views: 327
Reputation: 488
set dialog to false just like in the example and then change the state whenever you click the button.
Upvotes: 1