feat(VnTable): refs #6825 actions sticky
This commit is contained in:
parent
ac77fea3d7
commit
d50e2ada0f
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue