DemoDialogLoader.vue
703 Bytes
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
<script setup>
const isDialogVisible = ref(false)
watch(isDialogVisible, value => {
if (!value)
return
setTimeout(() => {
isDialogVisible.value = false
}, 4000)
})
</script>
<template>
<!-- Dialog Activator -->
<VBtn
:disabled="isDialogVisible"
@click="isDialogVisible = true"
>
Start loading
</VBtn>
<!-- Dialog -->
<VDialog
v-model="isDialogVisible"
width="300"
>
<VCard
color="primary"
width="300"
>
<VCardText class="pt-3 text-white">
Please stand by
<VProgressLinear
indeterminate
class="mt-4"
color="#fff"
/>
</VCardText>
</VCard>
</VDialog>
</template>