|
|
@@ -77,14 +77,21 @@
|
|
|
|
|
|
<template #body-cell-actions="{ row }">
|
|
|
<q-td auto-width>
|
|
|
- <q-item-section class="no-wrap" style="flex-direction: row">
|
|
|
+ <q-item-section class="no-wrap" style="flex-direction: row; gap: 4px">
|
|
|
<slot name="body-cell-actions" :row="row" />
|
|
|
+ <q-btn
|
|
|
+ v-if="openItemRoute"
|
|
|
+ outline
|
|
|
+ icon="mdi-pencil-outline"
|
|
|
+ style="width: 36px"
|
|
|
+ @click.prevent.stop="router.push({ name: openItemRoute, params: { id: row.id } })"
|
|
|
+ />
|
|
|
<q-btn
|
|
|
v-if="deleteFunction"
|
|
|
outline
|
|
|
icon="mdi-trash-can-outline"
|
|
|
style="width: 36px"
|
|
|
- class="q-ml-auto q-mr-sm"
|
|
|
+ color="negative"
|
|
|
@click.prevent.stop="onDelete(row.id)"
|
|
|
/>
|
|
|
</q-item-section>
|
|
|
@@ -112,13 +119,20 @@
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<slot name="body-cell-actions" :row="row" />
|
|
|
- <q-item-section v-if="deleteFunction">
|
|
|
+ <q-item-section v-if="openItemRoute || deleteFunction" style="flex-direction: row; gap: 4px">
|
|
|
+ <q-btn
|
|
|
+ v-if="openItemRoute"
|
|
|
+ outline
|
|
|
+ icon="mdi-pencil-outline"
|
|
|
+ style="width: 36px"
|
|
|
+ @click.prevent.stop="router.push({ name: openItemRoute, params: { id: row.id } })"
|
|
|
+ />
|
|
|
<q-btn
|
|
|
v-if="deleteFunction"
|
|
|
outline
|
|
|
icon="mdi-trash-can-outline"
|
|
|
style="width: 36px"
|
|
|
- class="q-mr-sm"
|
|
|
+ color="negative"
|
|
|
@click.prevent.stop="onDelete(row.id)"
|
|
|
/>
|
|
|
</q-item-section>
|