DemoDialogNesting.vue
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script setup>
const isDialogVisible = ref(false)
const isDialogTwoShow = ref(false)
</script>
<template>
<VBtn @click="isDialogVisible = true">
Open Dialog
</VBtn>
<!-- Dialog -->
<VDialog
v-model="isDialogVisible"
class="v-dialog-sm"
>
<VCard title="Dialog">
<DialogCloseBtn
variant="text"
size="default"
@click="isDialogVisible = false"
/>
<VCardText>
Biscuit fruitcake marshmallow jelly beans jujubes halvah cupcake topping. Chocolate cookie jelly-o toffee tart oat cake. Tart sugar plum gingerbread halvah muffin sweet. Cake halvah tart soufflé pudding.
</VCardText>
<VCardActions>
<VSpacer />
<VBtn
color="error"
@click="isDialogVisible = false"
>
Close
</VBtn>
<VBtn @click="isDialogTwoShow = !isDialogTwoShow">
Open Dialog 2
</VBtn>
</VCardActions>
</VCard>
</VDialog>
<!-- Dialog 2 -->
<VDialog
v-model="isDialogTwoShow"
class="v-dialog-sm"
>
<VCard title="Dialog 2">
<DialogCloseBtn
variant="text"
size="default"
@click="isDialogTwoShow = false"
/>
<VCardText>I'm a nested dialog.</VCardText>
<VCardActions>
<VSpacer />
<VBtn @click="isDialogTwoShow = false">
Close
</VBtn>
</VCardActions>
</VCard>
</VDialog>
</template>