dev: hotfix
+ data table + genCrudHandler + crud-base
This commit is contained in:
@@ -10,9 +10,9 @@ const props = defineProps<{
|
||||
cols: Col[]
|
||||
header: Th[][]
|
||||
keys: string[]
|
||||
funcParsed: RecStrFuncUnknown
|
||||
funcHtml: RecStrFuncUnknown
|
||||
funcComponent: RecStrFuncComponent
|
||||
funcParsed?: RecStrFuncUnknown
|
||||
funcHtml?: RecStrFuncUnknown
|
||||
funcComponent?: RecStrFuncComponent
|
||||
selectMode?: 'single' | 'multiple'
|
||||
modelValue?: any[] | any
|
||||
}>()
|
||||
@@ -118,16 +118,16 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
||||
<TableCell v-for="(key, cellIndex) in keys" :key="`cell-${rowIndex}-${cellIndex}`" class="border">
|
||||
<!-- existing cell renderer -->
|
||||
<component
|
||||
:is="funcComponent[key]?.(row, rowIndex).component"
|
||||
v-if="funcComponent[key]"
|
||||
:is="funcComponent?.[key]?.(row, rowIndex).component"
|
||||
v-if="funcComponent?.[key]"
|
||||
:rec="row"
|
||||
:idx="rowIndex"
|
||||
v-bind="funcComponent[key]?.(row, rowIndex).props"
|
||||
/>
|
||||
<template v-else>
|
||||
<div v-if="funcHtml[key]" v-html="funcHtml[key]?.(row, rowIndex)"></div>
|
||||
<div v-if="funcHtml?.[key]" v-html="funcHtml?.[key]?.(row, rowIndex)"></div>
|
||||
<template v-else>
|
||||
{{ funcParsed[key]?.(row, rowIndex) ?? (row as any)[key] }}
|
||||
{{ funcParsed?.[key]?.(row, rowIndex) ?? (row as any)[key] }}
|
||||
</template>
|
||||
</template>
|
||||
</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user