2023-11-23 08:47:44 +07:00
|
|
|
<script lang="ts" setup>
|
2023-11-28 16:30:48 +07:00
|
|
|
defineEmits(['edit', 'delete'])
|
2023-12-04 16:41:10 +07:00
|
|
|
|
|
|
|
|
const props =
|
|
|
|
|
defineProps<{
|
|
|
|
|
nameId: string
|
|
|
|
|
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
|
2023-11-23 08:47:44 +07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-12-04 17:21:48 +07:00
|
|
|
<q-btn @click.stop icon="more_vert" color="grey" flat dense :data-testid="`action${props.nameId}`">
|
2023-11-23 08:47:44 +07:00
|
|
|
<q-menu auto-close>
|
|
|
|
|
<q-list dense>
|
2023-12-04 09:28:40 +07:00
|
|
|
<q-item clickable @click="() => $emit('edit')" id="FileltemActionEdit">
|
2023-12-01 11:47:42 +07:00
|
|
|
<q-item-section>
|
2023-12-04 02:45:11 +00:00
|
|
|
<div class="row items-center white">
|
2023-12-06 11:39:37 +07:00
|
|
|
<q-icon name="o_edit" color="positive" />
|
|
|
|
|
<span class="q-ml-sm ">แก้ไข</span>
|
2023-11-23 08:47:44 +07:00
|
|
|
</div>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
2023-12-04 02:45:11 +00:00
|
|
|
<q-item
|
|
|
|
|
clickable
|
|
|
|
|
@click="() => $emit('delete')"
|
|
|
|
|
id="FileltemActiondelete"
|
|
|
|
|
>
|
2023-12-01 11:47:42 +07:00
|
|
|
<q-item-section>
|
2023-12-04 02:45:11 +00:00
|
|
|
<div class="row items-center white">
|
2023-12-06 11:39:37 +07:00
|
|
|
<q-icon name="mdi-trash-can-outline" color="negative" />
|
2023-11-23 08:47:44 +07:00
|
|
|
<span class="q-ml-sm">ลบ</span>
|
|
|
|
|
</div>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-menu>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</template>
|
2023-12-01 11:47:42 +07:00
|
|
|
|
|
|
|
|
<style scoped>
|
2023-12-04 02:45:11 +00:00
|
|
|
.white {
|
2023-12-01 11:47:42 +07:00
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
2023-12-04 02:45:11 +00:00
|
|
|
display: block;
|
2023-12-01 11:47:42 +07:00
|
|
|
}
|
|
|
|
|
</style>
|