forked from verdnatura/salix-front
feat(VnTable): add slots for columns
This commit is contained in:
parent
73ec367987
commit
22f42ca7f9
|
@ -175,7 +175,7 @@ function columnName(col) {
|
|||
}
|
||||
|
||||
function getColAlign(col) {
|
||||
return 'text-' + (col.align ?? 'left')
|
||||
return 'text-' + (col.align ?? 'left');
|
||||
}
|
||||
defineExpose({
|
||||
reload,
|
||||
|
@ -310,6 +310,7 @@ defineExpose({
|
|||
class="no-margin q-px-xs"
|
||||
:class="getColAlign(col)"
|
||||
>
|
||||
<slot :name="`column-${col.name}`" :col="col" :row="row">
|
||||
<VnTableColumn
|
||||
:column="col"
|
||||
:row="row"
|
||||
|
@ -317,6 +318,7 @@ defineExpose({
|
|||
v-model="row[col.name]"
|
||||
component-prop="columnField"
|
||||
/>
|
||||
</slot>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-tableActions="{ col, row }">
|
||||
|
@ -411,6 +413,11 @@ defineExpose({
|
|||
@click="
|
||||
stopEventPropagation($event)
|
||||
"
|
||||
>
|
||||
<slot
|
||||
:name="`column-${col.name}`"
|
||||
:col="col"
|
||||
:row="row"
|
||||
>
|
||||
<VnTableColumn
|
||||
:column="col"
|
||||
|
@ -420,6 +427,7 @@ defineExpose({
|
|||
component-prop="columnField"
|
||||
:show-label="true"
|
||||
/>
|
||||
</slot>
|
||||
</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
|
|
Loading…
Reference in New Issue