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