-
Notifications
You must be signed in to change notification settings - Fork 95
/
VTailwindModal.vue
40 lines (39 loc) 路 1.07 KB
/
VTailwindModal.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
<template>
<vue-final-modal
v-bind="$attrs"
classes="flex justify-center items-center"
content-class="relative flex flex-col max-h-full mx-4 p-4 border dark:border-gray-800 rounded bg-white dark:bg-gray-900"
v-on="$listeners"
>
<template #default="{ params }">
<span class="mr-8 text-2xl font-bold ">
<slot name="title"></slot>
</span>
<div class="flex-grow overflow-y-auto">
<slot :params="params"></slot>
</div>
<div class="flex-shrink-0 flex justify-center items-center pt-4">
<button class="vfm-btn" @click="$emit('confirm', close)">
confirm
</button>
<button class="vfm-btn" @click="$emit('cancel', close)">
cancel
</button>
</div>
<button class="absolute top-0 right-0 mt-2 mr-2" @click="close">
<mdi-close></mdi-close>
</button>
</template>
</vue-final-modal>
</template>
<script>
export default {
name: 'VTailwindModal',
inheritAttrs: false,
methods: {
close() {
this.$emit('input', false)
}
}
}
</script>