Kolumntyp radrubrik i tabell
Innehåll
Använd kolumntypen radrubrik (rowheader) när en cell ska identifiera raden och fungera som rubrik för resten av radens innehåll.
Det förbättrar tabellens tillgänglighet.
import { defineTableColumns } from "@fkui/vue";
interface Row {
fruit: string;
}
const columns = defineTableColumns<Row>([
{
type: "rowheader",
header: "Frukt",
key: "fruit",
},
]);
Bra att veta
- Använd
keyellertext(row)för innehållet.
Parametrar
description?: string | Readonly<Ref<string | null>>;Optional- Format description (shown in header)
enabled?: MaybeRef<boolean>;Optional- When enabled, the column is rendered. Set to
falseto hide the column and its cells. Default:true. header: string | Readonly<Ref<string>>;- Column header
size?: TableColumnSize | Readonly<Ref<TableColumnSize | null>>;Optional-
Column size, can be one of:
"grow": the column occupies as much space as it can."shrink": the column occupies as little space as it can.
Default:
"grow". sort?: boolean;Optional- ‐
visible?: (this: void, row: T) => boolean;Optional-
Show cell content.
A callback that can be used for hiding specific cells in the column.
Default
() => true. key?: K;Optional- ‐
text?(this: void, row: T): string;Optional- Header text
type: "rowheader";- Column type