Skip to content

FaTable

Adds search forms, pagination, remote requests, column settings, single/multiple selection, tree data, loading and business slots to ElTable. Height follows the container and supplied table height, without an additional mobile minimum height. Container changes synchronize width and height, but automatic column widths are recalculated only when the width changes, so a mobile keyboard height change does not interrupt input. Card borders use the Element Plus theme.

Row data types

DefaultRow is the public default row type and permits fields not declared in advance. Extend it for known data structures and use FaTableColumnCtx<T> and PagedResult<T> for precise column and pagination types.

ts
import type { DefaultRow, FaTableColumnCtx, PagedResult } from "fast-element-plus";

interface UserRow extends DefaultRow {
	id: number;
	name: string;
}

const columns: FaTableColumnCtx<UserRow>[] = [{ prop: "name", label: "Name" }];

const result: PagedResult<UserRow> = {
	rows: [{ id: 1, name: "Fast" }],
	totalRows: 1,
};

Basic

View code
Vue
<template>
	<FaTable :data="rows" :pagination="false" :tool-btn="false" hide-search-time>
		<FaTableColumn prop="name" label="项目" min-width="180" copy />
		<FaTableColumn prop="owner" label="负责人" width="120" />
		<FaTableColumn prop="status" label="状态" width="100" tag :enum="statusOptions" />
		<FaTableColumn prop="createdTime" label="创建时间" type="dateTime" width="180" />
	</FaTable>
</template>

<script setup lang="ts">
import type { FaTableEnumColumnCtx } from "fast-element-plus";

const rows = [
	{ id: 1, name: "Fast Admin", status: 1, owner: "小方", createdTime: "2026-08-20 09:30:00" },
	{ id: 2, name: "Fast Element Plus", status: 1, owner: "Fast 团队", createdTime: "2026-08-22 14:10:00" },
	{ id: 3, name: "Fast.NET", status: 0, owner: "SDK 团队", createdTime: "2026-08-25 18:20:00" },
];

const statusOptions: FaTableEnumColumnCtx[] = [
	{ label: "停用", value: 0, type: "danger" },
	{ label: "启用", value: 1, type: "success" },
];
</script>
View code
Vue
<template>
	<FaTable :request-api="requestApi" :columns="columns" column-setting-btn />
</template>

<script setup lang="ts">
import type { FaTableColumnCtx, FaTableEnumColumnCtx, PagedInput, PagedResult } from "fast-element-plus";

const statuses: FaTableEnumColumnCtx[] = [
	{ label: "停用", value: 0, type: "danger" },
	{ label: "启用", value: 1, type: "success" },
];
const allRows = Array.from({ length: 57 }, (_, index) => ({
	id: index + 1,
	name: `业务模块 ${String(index + 1).padStart(2, "0")}`,
	owner: ["平台组", "业务组", "SDK 组"][index % 3],
	status: index % 4 === 0 ? 0 : 1,
	createdTime: `2026-08-${String((index % 26) + 1).padStart(2, "0")} 10:30:00`,
}));
const columns: FaTableColumnCtx[] = [
	{ prop: "name", label: "模块名称", minWidth: 180, copy: true, search: { el: "el-input", order: 3 } },
	{ prop: "owner", label: "负责人", width: 120, search: { el: "el-input", order: 2 } },
	{ prop: "status", label: "状态", width: 100, tag: true, enum: statuses, search: { el: "el-select", order: 1 } },
	{ prop: "createdTime", label: "创建时间", type: "dateTime", width: 180 },
];

const requestApi = async (input?: PagedInput): Promise<PagedResult<Record<string, unknown>>> => {
	await new Promise<void>((resolve) => {
		window.setTimeout(resolve, 300);
	});
	let result = [...allRows];
	for (const key of ["name", "owner", "status"] satisfies Array<keyof (typeof allRows)[number]>) {
		const value: unknown = input?.[key];
		if (value === undefined || value === null || value === "") continue;
		if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") continue;
		result = result.filter((row) => String(row[key]).includes(String(value)));
	}
	const pageIndex = input?.pageIndex ?? 1;
	const pageSize = input?.pageSize ?? 20;
	return {
		pageIndex,
		pageSize,
		totalRows: result.length,
		rows: result.slice((pageIndex - 1) * pageSize, pageIndex * pageSize),
	};
};
</script>

Selection

View code
Vue
<template>
	<div class="demo-stack">
		<FaTable
			:data="rows"
			:pagination="false"
			:tool-btn="false"
			hide-search-time
			single
			row-click-selection
			:row-selectable="(row) => !row['locked']"
			@selection-change="selectedNames = $event.map((item) => String(item['name']))"
		>
			<FaTableColumn prop="name" label="名称" min-width="180" />
			<FaTableColumn prop="locked" label="是否锁定" width="120">
				<template #default="{ row }"
					><ElTag :type="row['locked'] ? 'danger' : 'success'">{{ row["locked"] ? "锁定" : "可选" }}</ElTag></template
				>
			</FaTableColumn>
		</FaTable>
		<span class="demo-value">当前单选:{{ selectedNames.join("") || "未选择" }}</span>
	</div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const selectedNames = ref<string[]>([]);
const rows = [
	{ id: 1, name: "可选择记录", locked: false },
	{ id: 2, name: "锁定记录", locked: true },
	{ id: 3, name: "点击整行选择", locked: false },
];
</script>

Tree Table

View code
Vue
<template>
	<FaTable :data="rows" default-expand-all :pagination="false" :tool-btn="false" hide-search-time>
		<FaTableColumn prop="name" label="模块" min-width="220" />
		<FaTableColumn prop="owner" label="负责团队" min-width="160" />
	</FaTable>
</template>

<script setup lang="ts">
const rows = [
	{
		id: 1,
		name: "组件",
		owner: "前端团队",
		children: [
			{ id: 11, name: "表单组件", owner: "表单小组" },
			{ id: 12, name: "表格组件", owner: "数据小组" },
		],
	},
	{
		id: 2,
		name: "SDK",
		owner: "平台团队",
		children: [{ id: 21, name: "Fast.NET", owner: "SDK 小组" }],
	},
];
</script>

Native Element Plus tree tables need only row-key and children data. Leave tree-data unset; Fast treeData flattens grouped children into ordinary rows.

Expandable Rows

View code
Vue
<template>
	<div class="demo-stack">
		<FaTable :data="rows" :pagination="false" :tool-btn="false" hide-search-time @expand-change="handleExpand">
			<FaTableColumn type="expand" width="48">
				<template #default="{ row }">
					<div style="padding: 12px 24px">
						<strong>{{ row["name"] }}</strong>
						<p style="margin: 6px 0 0">{{ row["description"] }}</p>
					</div>
				</template>
			</FaTableColumn>
			<FaTableColumn prop="name" label="项目" min-width="200" />
			<FaTableColumn prop="owner" label="负责团队" min-width="140" />
		</FaTable>
		<span class="demo-value">已展开:{{ expandedNames.join("、") || "无" }}</span>
	</div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const expandedNames = ref<string[]>([]);
const rows = [
	{ id: 1, name: "Fast.Element.Plus", owner: "Fast 团队", description: "面向团队编码习惯封装的 Element Plus 业务组件库。" },
	{ id: 2, name: "Fast.NET", owner: "SDK 团队", description: "Fast 系列 .NET SDK 基础能力。" },
	{ id: 3, name: "Fast.Admin", owner: "平台团队", description: "后台管理与权限业务应用。" },
];

const handleExpand = (row: Record<string, unknown>, expanded: boolean | Record<string, unknown>[]): void => {
	const name = String(row["name"]);
	if (Array.isArray(expanded)) {
		expandedNames.value = expanded.map((item) => String(item["name"]));
	} else if (expanded) {
		expandedNames.value = [...new Set([...expandedNames.value, name])];
	} else {
		expandedNames.value = expandedNames.value.filter((item) => item !== name);
	}
};
</script>

Sort Filter Fixed

View code
Vue
<template>
	<FaTable :data="rows" :pagination="false" :tool-btn="false" height="320" hide-search-time border @sort-change="handleSort">
		<FaTableColumn prop="name" label="名称" min-width="230" fixed show-overflow-tooltip />
		<FaTableColumn prop="owner" label="负责人" width="110" />
		<FaTableColumn
			prop="status"
			label="状态筛选"
			width="130"
			:filters="[
				{ text: '进行中', value: '进行中' },
				{ text: '已完成', value: '已完成' },
				{ text: '已暂停', value: '已暂停' },
			]"
			:filter-method="filterStatus"
		/>
		<FaTableColumn prop="visits" label="访问量排序" width="140" sortable align="right" />
		<FaTableColumn label="固定操作" width="110" fixed="right">
			<template #default="{ row }"
				><ElButton link type="primary">查看 {{ row["id"] }}</ElButton></template
			>
		</FaTableColumn>
	</FaTable>
</template>

<script setup lang="ts">
import { ref } from "vue";

interface RowData {
	id: number;
	name: string;
	owner: string;
	status: string;
	visits: number;
}

const sourceRows: RowData[] = [
	{ id: 1, name: "Fast.Element.Plus 文档与案例建设", owner: "小方", status: "进行中", visits: 1860 },
	{ id: 2, name: "Fast.NET SDK", owner: "研发组", status: "已完成", visits: 5320 },
	{ id: 3, name: "Fast.Admin 权限中心", owner: "平台组", status: "进行中", visits: 2980 },
	{ id: 4, name: "移动端业务门户", owner: "前端组", status: "已暂停", visits: 920 },
];
const rows = ref([...sourceRows]);

const filterStatus = (value: unknown, row: Record<string, unknown>): boolean => row["status"] === value;
const handleSort = ({ prop, order }: { order: "" | "ascending" | "descending"; prop: string }): void => {
	if (!order) {
		rows.value = [...sourceRows];
		return;
	}
	const key = prop as keyof RowData;
	const direction = order === "ascending" ? 1 : -1;
	rows.value = [...sourceRows].sort((left, right) => {
		const leftValue = Number(left[key]);
		const rightValue = Number(right[key]);
		return leftValue === rightValue ? 0 : leftValue > rightValue ? direction : -direction;
	});
};
</script>

Slots Expose

View code
Vue
<template>
	<FaTable ref="tableRef" :data="rows" :pagination="false" hide-search-time>
		<template #header><ElTag type="primary">自定义头部插槽</ElTag></template>
		<template #toolButton>
			<ElButton type="primary" @click="tableRef?.refresh()">刷新</ElButton>
			<ElButton @click="tableRef?.reset()">重置</ElButton>
		</template>
		<FaTableColumn prop="name" label="项目" min-width="180" />
		<FaTableColumn prop="version" label="版本" width="120" />
		<template #operation="{ row }"><ElButton link type="primary" @click="ElMessage.info(`查看 ${String(row['name'])}`)">查看</ElButton></template>
		<template #footer
			><div class="demo-value">表格 Loading:{{ tableRef?.loading ? "是" : "否" }}</div></template
		>
	</FaTable>
</template>

<script setup lang="ts">
import { useTemplateRef } from "vue";
import { ElMessage } from "element-plus";

interface TableExpose {
	loading: boolean;
	refresh: () => Promise<void>;
	reset: () => Promise<void>;
}

const tableRef = useTemplateRef<TableExpose>("tableRef");
const rows = [
	{ id: 1, name: "Fast.Element.Plus", version: "2.0.3" },
	{ id: 2, name: "Fast.NET", version: "5.x" },
];
</script>

FaTable Complete API

Props (75)

Fast and Element Plus 2.14.6 props are merged below. Fast changes appear first; native props that are not forwarded remain visible for compatibility review.

PropertySourceDescriptionTypeDefault
dataFast overrideComponent data.ArrayFast[]EL[]
sizeFast overrideComponent size.StringFastEL
heightFast overrideComponent height.String / NumberFastEL
rowKeyFast overrideUnique row or node key.String / FunctionFastidELid
tableKeyFast additionUnique key for the table instance and persisted settings.StringGenerated at runtime
requestApiFast additionAsynchronous data-request function.Function
dataCallbackFast additionTransformation/callback after table data loads.Function
initParamFast additionInitial request parameters.String / Number / Object
columnsFast additionTable column configuration.Array / Booleanfalse
columnsChangeFast additionColumn-settings change callback.Function
searchFormColsFast additionResponsive search-form column counts.String / Number / Object{"xs":2,"sm":3,"md":4,"lg":5,"xl":6}
collapsedSearchFast additionCollapse table search conditions by default.Booleantrue
advancedSearchDrawerFast additionShow advanced search inside a drawer.Booleanfalse
searchFormFast additionInitial search-form values.Booleantrue
headerCardFast additionUse card styling for the table header area.Booleantrue
refreshBtnFast additionShow refresh button.Booleantrue
searchBtnFast additionShow search button.Booleantrue
columnSettingBtnFast additionShow column-settings button.Booleanfalse
toolBtnFast additionShow table tools.Booleantrue
hideSearchTimeFast additionHide the default time-search field.Booleanfalse
futureSearchTimeFast additionAllow future dates in time search.Booleanfalse
dataSearchRangeFast additionDefault table time-search range.StringPast3D
paginationFast additionShow pagination or configure pagination.Booleantrue
pageSizesFast additionAvailable page sizes.Array[20,30,50,100]
hideImageFast additionHide image-column preview.Booleanfalse
singleFast additionUse single-select table mode.Booleanfalse
rowClickSelectionFast additionToggle selection on row click.Booleanfalse
treeDataFast additionFlattens each parent's children into table rows and merges parent fields into them; native Element Plus tree-table expansion does not require this.Booleanfalse
propsFast additionField mappings.Object{"children":"children"}
autoRefreshFast additionRefresh automatically according to configuration.Booleantrue
rowSelectableFast additionPredicate controlling row selectability.Function
widthEL nativeComponent width.String / Number
maxHeightEL nativetable's max-height. The legal value is a number or the height in pxString / Number
fitEL nativeHow content fits its container.Booleantrue
stripeEL nativeShow striped rows.Booleanfalse
borderEL nativeShow table borders.Booleantrue
showHeaderEL nativewhether Table header is visibleBooleantrue
showSummaryEL nativewhether to display a summary rowBooleanfalse
sumTextEL nativedisplayed text for the first column of summary rowString
summaryMethodEL nativecustom summary methodFunction
rowClassNameEL nativefunction that returns custom class names for a row, or a string assigning class names for every rowString / Function
rowStyleEL nativefunction that returns custom style for a row, or an object assigning custom style for every rowObject / Function
cellClassNameEL nativefunction that returns custom class names for a cell, or a string assigning class names for every cellString / Function
cellStyleEL nativefunction that returns custom style for a cell, or an object assigning custom style for every cellObject / Function
headerRowClassNameEL nativefunction that returns custom class names for a row in table header, or a string assigning class names for every row in table headerString / Function
headerRowStyleEL nativefunction that returns custom style for a row in table header, or an object assigning custom style for every row in table headerObject / Function
headerCellClassNameEL nativefunction that returns custom class names for a cell in table header, or a string assigning class names for every cell in table headerString / Function
headerCellStyleEL nativefunction that returns custom style for a cell in table header, or an object assigning custom style for every cell in table headerObject / Function
highlightCurrentRowEL nativewhether current row is highlightedBooleantrue
currentRowKeyEL nativekey of current row, a set only propString / Number
emptyTextEL nativeEmpty-state text.String
expandRowKeysEL nativeset expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop.Array
rowExpandableEL nativeenable expandable rows, works when the table has a column type="expand"Function
defaultExpandAllEL nativeExpand all nodes by default.Booleanfalse
defaultSortEL nativeset the default sort column and order. property prop is used to set default sort column, property order is used to set default sort orderObject
tooltipEffectEL nativethe effect of the overflow tooltipString
tooltipOptionsEL nativethe options for the overflow tooltip, see the following tooltip componentObject
spanMethodEL nativemethod that returns rowspan and colspanFunction
selectOnIndeterminateEL nativecontrols the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselectedBooleantrue
indentEL nativeHorizontal tree-level indentation in pixels.Number16
treePropsEL nativeconfiguration for rendering nested dataObject{"hasChildren":"hasChildren","children":"children","checkStrictly":false}
lazyEL nativeEnable lazy loading.Booleanfalse
loadEL nativeLazy tree-node loader.Function
styleEL nativeCustom table cell/header styles.Object{}
classNameEL nativeCustom table cell/header class.String""
tableLayoutEL nativesets the algorithm used to lay out table cells, rows, and columnsStringfixed
scrollbarAlwaysOnEL nativealways show scrollbarBooleanfalse
flexibleEL nativeensure main axis minimum-size doesn't follow the contentBooleanfalse
showOverflowTooltipEL nativewhether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns, refer to table tooltip-optionsBoolean / Objectfalse
tooltipFormatterEL nativecustomize tooltip content when using show-overflow-tooltipFunction
appendFilterPanelToEL nativewhich element the filter panels appends toString
scrollbarTabindexEL nativebody scrollbar's wrap container tabindexNumber / String
allowDragLastColumnEL nativewhether to allow drag the last columnBooleantrue
preserveExpandedContentEL nativewhether to preserve expanded row content in DOM when collapsedBooleanfalse
nativeScrollbarEL nativewhether to use native scrollbarsBooleanfalse
Events(24)
NameSourceDescriptionParameters / type
selectEL nativeRow or option selection.
selectAllEL nativeTable select-all state changes, with currently selected rows.
selectionChangeEL nativeTable selection collection changes.
cellMouseEnterEL nativePointer enters a cell.
cellMouseLeaveEL nativePointer leaves a cell.
cellClickEL nativeCell click with row, column, cell, and native event.
cellDblclickEL nativeCell double-click.
cellContextmenuEL nativeCell context-menu event.
rowClickEL nativeTable-row click; arguments match ElTable row-click.
rowContextmenuEL nativeTable-row context menu.
rowDblclickEL nativeTable-row double-click.
headerClickEL nativeHeader-cell click.
headerContextmenuEL nativeHeader-cell context menu.
sortChangeEL nativeTable sorting changes.
filterChangeEL nativeTable filters change.
currentChangeEL nativeCurrent table row, tree node, or selected value changes.
headerDragendEL nativeColumn-width dragging ends.
expandChangeEL nativeTable-row expansion changes.
scrollEL nativeTable or selector scrolls.
refreshFast additionData refresh event.
resetFast additionSearch-reset event.
sizeChangeFast additionTable page size changes.
paginationChangeFast additionTable page number or page size changes.
customCellClickFast additionFast link-column click with custom event name and cell context.
Slots(12)
NameSourceDescriptionParameters / type
defaultEL nativeDefault component content.
appendEL nativeCustom content after the last table row.
emptyEL nativeCustom empty-state content.
topHeaderFast additionCustom content at the very top of the table.
headerFast additionCustom header or table-header business content.
toolButtonFast additionCustom common table tools.
toolButtonAdvFast additionCustom advanced table tools.
operationFast additionCustom table action-column content.
paginationFast additionCustom pagination area.
footerFast additionCustom footer actions; overlays provide loading and close.
columnSettingFast additionCustom table column-settings area.
Dynamic named column/search slotsFast additionBusiness slots generated from column slot/headerSlot or search-field names.
Expose(31)
NameSourceDescriptionParameters / type
clearSelectionEL nativeClears the current selection.
getSelectionRowsEL nativeGets currently selected table rows.
getHalfSelectionRowsFast additionGets partially selected tree-table rows.
toggleRowSelectionEL nativeToggles selection for a table row.
toggleAllSelectionEL nativeToggles table select-all.
toggleRowExpansionEL nativeToggles a table row's expansion.
setCurrentRowEL nativeSets the highlighted table row.
clearSortEL nativeClears table sorting.
clearFilterEL nativeClears table column filters.
doLayoutEL nativeRecalculates table layout.
sortEL nativeSorts the table by column and order.
scrollToEL nativeScrolls the table/virtual list to a position.
setScrollTopEL nativeSets vertical table scroll.
setScrollLeftEL nativeSets horizontal table scroll.
columnsEL nativeCurrently rendered ElTable column contexts.
updateKeyChildrenEL nativeUpdates tree/tree-table children by node key.
loadingFast additionFast business loading state.
tableDataFast additionCurrently rendered table data.
tablePaginationFast additionCurrent pagination state.
searchParamFast additionSearch parameters currently passed to the request function.
selectedFast additionWhether any table rows are selected.
selectedListFast additionComplete selected data objects.
selectedListIdsFast additionPrimary keys of selected rows.
indeterminateSelectedListIdsFast additionPrimary keys of partially selected tree-table rows.
tableWidthFast additionCalculated available table width.
tableHeightFast additionCalculated available table height.
toggleRowIndeterminateSelectionFast additionToggles partial selection for a tree-table row.
refreshFast additionRepeats the data request or refreshes business content.
resetFast additionResets table search, pagination, and data.
doRenderFast additionForces table recalculation and rendering.
doLoadingFast additionRuns a sync/async function with shared loading and overlay state.

Adds image, date/time, decimal precision, thousands separators, copy, links, tags, merged rows, and time-information columns to native ElTableColumn capabilities.

Column Types

View code
Vue
<template>
	<FaTable :data="rows" :pagination="false" :tool-btn="false" hide-search-time>
		<FaTableColumn prop="image" label="图片" type="image" original-image width="90" />
		<FaTableColumn prop="name" label="名称" min-width="180" copy link :click="handleLinkClick" />
		<FaTableColumn prop="amount" label="千分位" type="gd2" width="130" align="right" />
		<FaTableColumn prop="ratio" label="六位小数" type="d6" width="120" align="right" />
		<FaTableColumn prop="status" label="枚举标签" tag :enum="statuses" width="100" />
		<FaTableColumn prop="createdTime" label="日期时间" type="dateTime" width="180" />
	</FaTable>
</template>

<script setup lang="ts">
import { ElMessage } from "element-plus";
import type { FaTableEnumColumnCtx } from "fast-element-plus";

const image = `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(
	'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80"><rect width="120" height="80" rx="8" fill="#409eff"/><text x="60" y="48" text-anchor="middle" font-size="20" fill="white">Fast</text></svg>'
)}`;
const rows = [
	{ id: 1, name: "Fast.Element.Plus", amount: 12345.6, ratio: 0.876543, status: 1, image, createdTime: "2026-08-26 09:30:00" },
	{ id: 2, name: "Fast.NET", amount: 9876543.21, ratio: 0.123456, status: 0, image, createdTime: "2026-08-25 16:20:00" },
];
const statuses: FaTableEnumColumnCtx[] = [
	{ label: "停用", value: 0, type: "danger" },
	{ label: "启用", value: 1, type: "success" },
];
const handleLinkClick = ({ row }: { row: Record<string, unknown> }): void => {
	ElMessage.info(String(row["name"]));
};
</script>

Image Columns

View code
Vue
<template>
	<FaTable :data="rows" :pagination="false" :tool-btn="false" hide-search-time>
		<FaTableColumn prop="cover" label="缩略图与预览" type="image" original-image width="130" />
		<FaTableColumn prop="cover" label="隐藏缩略图" type="image" hide-image width="130" />
		<FaTableColumn prop="name" label="资源名称" min-width="180" />
	</FaTable>
</template>

<script setup lang="ts">
const createImage = (text: string, color: string): string =>
	`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(
		`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 200"><rect width="320" height="200" rx="20" fill="${color}"/><circle cx="70" cy="70" r="32" fill="rgba(255,255,255,.32)"/><path d="M30 170 105 105l48 42 42-32 95 55" fill="none" stroke="white" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/><text x="250" y="58" text-anchor="middle" font-size="30" fill="white">${text}</text></svg>`
	)}`;

const rows = [
	{ id: 1, name: "项目封面", cover: createImage("封面", "#409eff") },
	{ id: 2, name: "产品截图", cover: createImage("截图", "#67c23a") },
	{ id: 3, name: "无图片占位", cover: "" },
];
</script>

Merge Time Info

View code
Vue
<template>
	<FaTable :data="rows" :pagination="false" :tool-btn="false" hide-search-time border>
		<FaTableColumn prop="department" label="部门(自动合并)" span-prop="department" min-width="150" />
		<FaTableColumn prop="name" label="工作事项" min-width="180" />
		<FaTableColumn type="timeInfo" label="操作信息" min-width="240" />
	</FaTable>
</template>

<script setup lang="ts">
const rows = [
	{
		id: 1,
		department: "研发中心",
		name: "组件库维护",
		createdUserName: "小方",
		createdTime: "2026-08-27 09:20:00",
	},
	{
		id: 2,
		department: "研发中心",
		name: "文档站建设",
		createdUserName: "前端组",
		createdTime: "2026-08-27 10:35:00",
	},
	{
		id: 3,
		department: "产品中心",
		name: "需求评审",
		createdUserName: "产品组",
		createdTime: "2026-08-26 16:10:00",
	},
];
</script>

Fast column types

TypePurpose
default, selection, index, expandNative default, selection, index, and expansion columns
imageImages and previews
date, time, dateTimeDate, time, and date-time formatting
d2, d4, d6Fixed 2, 4, or 6 decimal places
gd2, gd4, gd6Fixed precision with thousands separators
timeInfoCombined user and time information

FaTableColumn Complete API

Props (51)

Fast and Element Plus 2.14.6 props are merged below. Fast changes appear first; native props that are not forwarded remain visible for compatibility review.

PropertySourceDescriptionTypeDefault
typeFast overrideFast business column type.StringFastdefaultELdefault
widthFast overrideComponent width.String / NumberFastautoEL""
alignFast overridealignmentStringFastleftEL
headerAlignFast overridealignment of the table header. If omitted, the value of the above align attribute will be appliedStringFastleftEL
showFast additionShow the current column or layout item.Booleanfalse
smallWidthFast additionTable column width in small mode.String / Number
autoWidthFast additionCalculate column width from cell content.Booleanfalse
slotFast additionNamed slot for a custom table cell.String
headerSlotFast additionNamed slot for a custom table header.String
headerRenderFast additionTSX table-header renderer.Function
renderFast additionTSX table-cell renderer.Function
_childrenFast additionChild-column configuration for grouped headers.Array
hideImageFast additionHide image-column preview.Booleanfalse
copyFast additionShow cell copy action.Booleanfalse
linkFast additionRender cells as link buttons.Booleanfalse
spanPropFast additionField used for vertical row spanning.String
clickFast additionLink-column click callback receiving row and row index.Function
clickEmitFast additionCustom event name emitted by link-column clicks.String
originalImageFast additionUse original images for image-column display and preview.Booleanfalse
dateFixFast additionAlso show a relative-time label in date columns.Booleanfalse
dateFormatFast additionCustom date-column format.String
tagFast additionRender cells as enum tags.Booleanfalse
enumFast additionEnum options, dictionary name, or per-row dictionary factory.String / Array / Function
dataDeleteFieldFast additionLogical-deletion field; matching cells display a deletion overlay.String
timeInfoFieldFast additionUsername/time field mappings for time-info columns.Object{"userName":"createdUserName","time":"createdTime"}
labelEL nativeDisplay text or synchronized label.String
classNameEL nativeCustom table cell/header class.String
labelClassNameEL nativeclass name of the label of this columnString
propertyEL nativeTable data field, equivalent to prop.String
propEL nativefield name. You can also use its alias: propertyString
minWidthEL nativecolumn minimum width. Columns with width has a fixed width, while columns with min-width has a width that is distributed in proportionString / Number""
renderHeaderEL nativerender function for table header of this columnFunction
sortableEL nativewhether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the sort-change event of TableBoolean / Stringfalse
sortMethodEL nativesorting method, works when sortable is true. Should return a number, just like Array.sortFunction
sortByEL nativespecify which property to sort by, works when sortable is true and sort-method is undefined. If set to an Array, the column will sequentially sort by the next property if the previous one is equalString / Function / Array
resizableEL nativeAllow drawer resizing.Booleantrue
columnKeyEL nativecolumn's key. If you need to use the filter-change event, you need this attribute to identify which column is being filteredString
showOverflowTooltipEL nativewhether to hide extra content and show them in a tooltip when hovering on the cellBoolean / Objectfalse
tooltipFormatterEL nativecustomize tooltip content when using show-overflow-tooltipFunction
fixedEL nativewhether column is fixed at left / right. Will be fixed at left if trueBoolean / Stringfalse
formatterEL nativeDisplay-value formatter.Function
selectableEL nativefunction that determines if a certain row can be selected, works when type is 'selection'Function
reserveSelectionEL nativewhether to reserve selection after data refreshing, works when type is 'selection'. Note that row-key is required for this to workBooleanfalse
filterMethodEL nativeLocal option-filtering function.Function
filteredValueEL nativefilter value for selected data, might be useful when table header is rendered with render-headerArray
filtersEL nativean array of data filtering options. For each element in this array, text and value are requiredArray
filterPlacementEL nativeplacement for the filter dropdownString
filterMultipleEL nativewhether data filtering supports multiple optionsBooleantrue
filterClassNameEL nativeclassName for the filter dropdownString
indexEL nativecustomize indices for each row, works on columns with type=indexNumber / Function
sortOrdersEL nativethe order of the sorting strategies used when sorting the data, works when sortable is true. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the arrayArray["ascending","descending",null]
Events(2)
NameSourceDescriptionParameters / type
imagePreviewFast additionImage preview opens, with the image URL.
customCellClickFast additionFast link-column click with custom event name and cell context.
Slots(4)
NameSourceDescriptionParameters / type
default(scope)EL nativeCustom cell content with row, column, and row index.{ row: any, column: TableColumnCtx<T>, $index: number }
header(scope)EL nativeCustom column header with column and column index.{ column: TableColumnCtx<T>, $index: number }
filter-iconEL native · not forwardedCustom content for filter icon{ filterOpened: boolean }
expandEL native · not forwardedCustom content for expand columns. The expandable property is supported starting from v2.13.2.{ expanded: boolean, expandable: boolean }
Expose(0)
NameSourceDescriptionParameters / type
None.

Internal column-settings dialog controlled by columnSettingBtn. Reorder using the left drag handle; touch interaction requires a short hold before dragging to avoid accidental sorting while scrolling. Requires FaTable state; use through FaTable.TableColumnsSettingDialog or internal table flows.

FaTableColumnsSettingDialog Complete API

Props (1)
PropertySourceDescriptionTypeDefault
changeFast additionPersistence callback after column settings change.Function
Events(0)
NameSourceDescriptionParameters / type
No runtime Emits declarations.
Slots(0)
NameSourceDescriptionParameters / type
None.
Expose(2)
NameSourceDescriptionParameters / type
openFast additionRuns the Fast asynchronous opening flow.
changeFast additionPublic component instance member.

Internal pagination bar reading table state and emitting page/page-size changes. Requires FaTable context and is not a standalone pagination component.

FaTablePagination Complete API

Props (1)
PropertySourceDescriptionTypeDefault
pageSizesFast additionAvailable page sizes.Array[20,30,50,100]
Events(2)
NameSourceDescriptionParameters / type
sizeChangeFast additionTable page size changes.
currentChangeFast additionCurrent table row, tree node, or selected value changes.
Slots(0)
NameSourceDescriptionParameters / type
None.
Expose(0)
NameSourceDescriptionParameters / type
None.

Responsive table search container handling basic/advanced search, collapse, and reset. Normally created by FaTable from column configuration.

FaTableSearchForm Complete API

Props (6)
PropertySourceDescriptionTypeDefault
showRequiredFast additionShow the current column or layout item.Booleanfalse
collapsedSearchFast additionCollapse table search conditions by default.Booleantrue
advancedSearchDrawerFast additionShow advanced search inside a drawer.Booleanfalse
colsFast additionColumn counts at responsive breakpoints.String / Number / Object{"xs":2,"sm":3,"md":4,"lg":5,"xl":6}
searchRequiredFast additionAsynchronous table-search function.Function
resetRequiredFast additionAsynchronous search-reset function.Function
Events(0)
NameSourceDescriptionParameters / type
No runtime Emits declarations.
Slots(1)
NameSourceDescriptionParameters / type
Dynamic named column/search slotsFast additionBusiness slots generated from column slot/headerSlot or search-field names.
Expose(0)
NameSourceDescriptionParameters / type
None.

Renders inputs from FaTableColumn search configuration and triggers searching on value changes. Requires FaTable search state; do not use independently.

FaTableSearchFormItem Complete API

Props (2)
PropertySourceDescriptionTypeDefault
columnRequiredFast additionFaTable column configuration for the current search field.Object
searchRequiredFast additionAsynchronous search after the field value changes.Function
Events(0)
NameSourceDescriptionParameters / type
No runtime Emits declarations.
Slots(1)
NameSourceDescriptionParameters / type
Dynamic named column/search slotsFast additionBusiness slots generated from column slot/headerSlot or search-field names.
Expose(0)
NameSourceDescriptionParameters / type
None.

FaTable instance methods

clearSelection Selection

Clears selection in a multi-select table.

Signature

ts
clearSelection(): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.clearSelection();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultvoidNo return value.

getSelectionRows Selection

Returns currently selected rows.

Signature

ts
getSelectionRows(): import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow[];

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const result = componentRef.value?.getSelectionRows();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultDefaultRow[]Method result consistent with the current component state.

getHalfSelectionRows Selection

Returns currently partially selected rows.

Signature

ts
getHalfSelectionRows(): import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow[];

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const result = componentRef.value?.getHalfSelectionRows();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultDefaultRow[]Method result consistent with the current component state.

toggleRowSelection Selection

Toggles row selection in a multi-select table; the second argument explicitly sets selection.

Signature

ts
toggleRowSelection(row: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow, selected?: boolean, ignoreSelectable?: boolean): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const row = { id: 1, name: "Fast" };
componentRef.value?.toggleRowSelection(row, true, true);
</script>

Input

InputTypeRequired / defaultDescription
rowDefaultRowRequiredTarget table row data.
selectedboolean | undefinedOptionalWhether the target row is selected.
ignoreSelectableboolean | undefinedOptionalWhether to ignore selectable restrictions.

Returns

ValueTypeDescription
resultvoidNo return value.

toggleAllSelection Selection

Toggles selecting all/none in a multi-select table.

Signature

ts
toggleAllSelection(): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.toggleAllSelection();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultvoidNo return value.

toggleRowExpansion Expand

Toggles an expandable/tree-table row; the second argument explicitly expands or collapses it.

Signature

ts
toggleRowExpansion(row: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow, expanded?: boolean): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const row = { id: 1, name: "Fast" };
componentRef.value?.toggleRowExpansion(row, true);
</script>

Input

InputTypeRequired / defaultDescription
rowDefaultRowRequiredTarget table row data.
expandedboolean | undefinedOptionalWhether the target row is expanded.

Returns

ValueTypeDescription
resultvoidNo return value.

setCurrentRow Current

Sets the current row in a single-select table; omitting the argument clears highlighting.

Signature

ts
setCurrentRow(row?: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow | undefined): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const row = { id: 1, name: "Fast" };
componentRef.value?.setCurrentRow(row);
</script>

Input

InputTypeRequired / defaultDescription
rowDefaultRow | undefinedOptionalTarget table row data.

Returns

ValueTypeDescription
resultvoidNo return value.

clearSort Sort

Clears sorting and restores unsorted data.

Signature

ts
clearSort(): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.clearSort();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultvoidNo return value.

clearFilter Filter

Clears filters for columnKey entries; with no argument, clears all filters.

Signature

ts
clearFilter(columnKeys?: string[] | string): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.clearFilter(["name"]);
</script>

Input

InputTypeRequired / defaultDescription
columnKeysstring | string[] | undefinedOptionalColumn keys whose filters should be cleared; omit for all columns.

Returns

ValueTypeDescription
resultvoidNo return value.

doLayout Layout

Recalculates table layout, for example after visibility changes.

Signature

ts
doLayout(): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.doLayout();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultvoidNo return value.

sort Sort

Sorts the table manually using the property and order.

Signature

ts
sort(prop: string, order: string): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.sort("name", "ascending");
</script>

Input

InputTypeRequired / defaultDescription
propstringRequiredForm field path or table sort property.
orderstringRequiredSort direction, such as ascending or descending.

Returns

ValueTypeDescription
resultvoidNo return value.

scrollTo Scroll

Scrolls to specified coordinates.

Signature

ts
scrollTo(options: ScrollToOptions | number, yCoord?: number): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.scrollTo({ top: 120, behavior: "smooth" }, 1);
</script>

Input

InputTypeRequired / defaultDescription
optionsnumber | ScrollToOptionsRequiredScroll distance or standard ScrollToOptions.
yCoordnumber | undefinedOptionalVertical scroll coordinate.

Returns

ValueTypeDescription
resultvoidNo return value.

setScrollTop Scroll

Sets vertical scroll position.

Signature

ts
setScrollTop(top?: number): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.setScrollTop(120);
</script>

Input

InputTypeRequired / defaultDescription
topnumber | undefinedOptionalVertical scroll distance.

Returns

ValueTypeDescription
resultvoidNo return value.

setScrollLeft Scroll

Sets horizontal scroll position.

Signature

ts
setScrollLeft(left?: number): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.setScrollLeft(120);
</script>

Input

InputTypeRequired / defaultDescription
leftnumber | undefinedOptionalHorizontal scroll distance.

Returns

ValueTypeDescription
resultvoidNo return value.

updateKeyChildren Node

Updates children for a key in a lazy table; requires rowKey.

Signature

ts
updateKeyChildren(key: string, data: import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow[]): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
componentRef.value?.updateKeyChildren(1, [row]);
</script>

Input

InputTypeRequired / defaultDescription
keystringRequiredUnique node, row, or column identifier.
dataDefaultRow[]RequiredBusiness data to query, insert, remove, or replace.

Returns

ValueTypeDescription
resultvoidNo return value.

toggleRowIndeterminateSelection Selection

Toggles partial selection styling in a multi-select table; the second argument explicitly sets selection.

Signature

ts
toggleRowIndeterminateSelection(row: DefaultRow, selected?: boolean): void;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const row = { id: 1, name: "Fast" };
componentRef.value?.toggleRowIndeterminateSelection(row, true);
</script>

Input

InputTypeRequired / defaultDescription
rowDefaultRowRequiredTarget table row data.
selectedboolean | undefinedOptionalWhether the target row is selected.

Returns

ValueTypeDescription
resultvoidNo return value.

refresh Refresh

Asynchronously refreshes the table.

Signature

ts
refresh(): Promise<void>;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const result = await componentRef.value?.refresh();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

reset Reset

Asynchronously resets the table.

Signature

ts
reset(): Promise<void>;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const result = await componentRef.value?.reset();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

doRender Render

Rerenders the table, for example when TableKey changes.

Signature

ts
doRender(): Promise<void>;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const result = await componentRef.value?.doRender();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

doLoading Loading

Runs a task with table loading state.

Signature

ts
doLoading(loadingFunction: () => void | Promise<void>, loadingText?: string): Promise<void>;

Example

vue
<template>
	<FaTable ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const componentRef = ref<InstanceType<typeof FaTable>>();
const saveData = async () => Promise.resolve();
const result = await componentRef.value?.doLoading(async () => saveData(), "Saving");
</script>

Input

InputTypeRequired / defaultDescription
loadingFunction() => void | Promise<void>RequiredSynchronous or asynchronous task to run while loading.
loadingTextstring | undefinedOptionalOptional loading-overlay text.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

FaTableColumnsSettingDialog instance methods

open Open

Opens.

Signature

ts
open(): Promise<void>;

Example

vue
<template>
	<Component ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const Component = FaTable.TableColumnsSettingDialog;
const componentRef = ref<InstanceType<typeof Component>>();
const result = await componentRef.value?.open();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

change Change

Handles column changes.

Signature

ts
change(): Promise<void>;

Example

vue
<template>
	<Component ref="componentRef" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { FaTable } from "fast-element-plus";

const Component = FaTable.TableColumnsSettingDialog;
const componentRef = ref<InstanceType<typeof Component>>();
const result = await componentRef.value?.change();
</script>

Input

This method has no input parameters.

Returns

ValueTypeDescription
resultPromise<void>Asynchronous result; callers handle Promise rejection.

State and lifecycle

Requests, automatic widths and doLoading own separate Loading entries. Manual false releases only its manual owner. Unmount cancels queued rendering/column tasks and settles doRender; late results cannot update state. ResizeObserver disconnects through watcher cleanup.