feat(VnTable): refs #6825 actions sticky

This commit is contained in:
Alex Moreno 2024-05-23 10:39:14 +02:00
parent ac77fea3d7
commit d50e2ada0f
1 changed files with 13 additions and 2 deletions

View File

@ -228,6 +228,9 @@ defineExpose({
/>
</QTh>
</template>
<template #header-cell-tableActions>
<QTh auto-width class="sticky" />
</template>
<template #body-cell-tableStatus="{ col, row }">
<QTd auto-width :class="`text-${col.align ?? 'left'}`">
<VnTableChip :columns="splittedColumns.columnChips" :row="row">
@ -253,7 +256,11 @@ defineExpose({
</QTd>
</template>
<template #body-cell-tableActions="{ col, row }">
<QTd auto-width :class="`text-${col.align ?? 'left'} `">
<QTd
auto-width
:class="`text-${col.align ?? 'left'}`"
class="sticky no-padding"
>
<QBtn
v-for="(btn, index) of col.actions"
:key="index"
@ -357,7 +364,7 @@ defineExpose({
</QTable>
</template>
</VnPaginate>
<QPageSticky v-if="create" :offset="[20, 20]">
<QPageSticky v-if="create" :offset="[20, 20]" style="z-index: 2">
<QBtn @click="showForm = !showForm" color="primary" fab icon="add" />
<QTooltip>
{{ create.title }}
@ -496,8 +503,12 @@ defineExpose({
}
.sticky {
position: sticky;
right: 0;
z-index: 1;
}
td.sticky {
background-color: var(--q-dark);
}
}
.vn-label-value {