dev: hotfix

+ data table
+ genCrudHandler
+ crud-base
This commit is contained in:
2025-10-04 06:55:12 +07:00
parent d9cedf8d42
commit ce785f2092
3 changed files with 188 additions and 7 deletions
@@ -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>