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

55 lines
1.3 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-11-29 17:11:21 +07:00
<q-dialog
persistent
transition-show="scale"
transition-hide="scale"
:model-value="props.open"
@update:model-value="(v) => $emit('update:open', v)"
>
2023-11-28 09:24:20 +07:00
<q-card style="width: 400px">
<q-card-section>
<span class="text-h6">
<q-icon name="error" color="negative" size="2.5rem" />แจงเตอนการลบ
</span>
2023-11-28 09:24:20 +07:00
</q-card-section>
<q-card-section class="q-pt-none">
าดำเนนการตอจะทำการลบ
</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-11-29 17:11:21 +07: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
flat
v-close-popup
label="ลบ"
2023-11-28 09:24:20 +07:00
class="text-red"
@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>