/
AddressDeletionDialog.vue
65 lines (61 loc) · 1.19 KB
/
AddressDeletionDialog.vue
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
64
65
<template>
<v-dialog
width="350"
:value="show"
@input="resolve"
>
<v-card>
<v-card-title>{{ title }}</v-card-title>
<v-card-subtitle class="mb-3 mt-3">
{{ message }}
</v-card-subtitle>
<v-card-text class="d-flex flex-row justify-space-around">
<v-btn
color="grey"
class="ma-2 elevation-2"
text
@click="resolve(false)"
>
Abort
</v-btn>
<v-btn
color="primary"
class="ma-2 elevation-2"
text
@click="resolve(true)"
>
Confirm
</v-btn>
</v-card-text>
</v-card>
</v-dialog>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'AddressDeletionDialog',
model: {
prop: 'show',
event: 'change',
},
props: {
show: {
type: Boolean,
default: false,
},
},
data() {
return {
title: '',
message: '',
resolveCallback: undefined as ((state: boolean) => void) | undefined,
}
},
methods: {
resolve(state: boolean) {
this.resolveCallback?.(state)
this.$emit('change', state)
},
},
})
</script>