-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathActionShell.vue
More file actions
44 lines (40 loc) · 1.23 KB
/
Copy pathActionShell.vue
File metadata and controls
44 lines (40 loc) · 1.23 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
<template>
<a-modal
:visible="visible"
:title="title"
:width="width"
:modal-class="customClass"
:mask-closable="canceledOnTouchOutside"
:esc-to-close="escapeToClose"
:hide-cancel="true"
:footer="$slots.footer ? undefined : false"
unmount-on-close
@cancel="emit('close')"
>
<template v-if="$slots.header" #title>
<slot name="header" />
</template>
<slot />
<template v-if="$slots.footer" #footer>
<slot name="footer" />
</template>
</a-modal>
</template>
<script setup>
defineProps({
visible: { type: Boolean, default: false },
title: { type: String, default: '' },
width: { type: [Number, String], default: 420 },
height: { type: [Number, String], default: 'auto' },
bottom: { type: Number, default: 0 },
canceledOnTouchOutside: { type: Boolean, default: true },
showClose: { type: Boolean, default: true },
escapeToClose: { type: Boolean, default: true },
resizable: { type: Boolean, default: false },
customClass: { type: String, default: '' },
module: { type: String, default: '' },
extend: { type: [Object, String], default: () => ({}) },
apiUrl: { type: String, default: '' }
})
const emit = defineEmits(['close', 'toast', 'reset'])
</script>