hrms-edm/Services/client/src/components/DialogDelete.vue

61 lines
1.5 KiB
Vue
Raw Normal View History

2023-11-28 09:24:20 +07:00
<script setup lang="ts">
2023-11-29 17:11:21 +07:00
defineEmits(['confirm', 'cancel', 'update:open'])
const props = withDefaults(
defineProps<{
open: boolean
}>(),
{
open: false,
},
)
2023-11-28 09:24:20 +07:00
</script>
<template>
2023-12-04 02:45:11 +00:00
<q-dialog
persistent
transition-show="scale"
transition-hide="scale"
:model-value="props.open"
@update:model-value="(v) => $emit('update:open', v)"
2023-11-29 17:11:21 +07:00
>
2023-11-28 09:24:20 +07:00
<q-card style="width: 400px">
<q-card-section>
2023-12-06 16:48:18 +07:00
<div class="flex items-center">
<div class="q-pa-sm">
<div style="border-radius: 50%" class="bg-secondary q-pa-sm">
<q-icon
name="mdi-trash-can-outline"
color="negative"
size="2.5rem"
/>
</div>
</div>
<div>
<h6 class="q-my-none">นยนการลบขอม</h6>
<p class="q-my-none">องการยนยนการลบขอมลนหรอไม</p>
</div>
</div>
2023-11-28 09:24:20 +07:00
</q-card-section>
2023-11-28 09:24:20 +07:00
<q-card-actions align="right" class="bg-white text-primary">
2023-11-28 09:24:20 +07:00
<q-space />
<q-btn
label="ยกเลิก"
flat
2023-11-28 09:24:20 +07:00
v-close-popup
2023-12-04 02:45:11 +00:00
@click="() => $emit('update:open', !open)"
2023-12-01 17:49:25 +07:00
id="dialogDeleteClose"
2023-11-28 09:24:20 +07:00
/>
<q-btn
2023-12-06 16:48:18 +07:00
color="negative"
2023-11-28 09:24:20 +07:00
v-close-popup
label="ลบ"
@click="() => $emit('confirm')"
2023-12-01 17:49:25 +07:00
id="dialogDeleteConfirm"
2023-11-28 09:24:20 +07:00
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>