Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TScroll } from '../common';
import type { TScroll } from '../common';

export interface TScroll {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const baseTableDefaultProps: TdBaseTableProps = {
disableDataPage: false,
disableSpaceInactiveRow: undefined,
empty: '',
enableLockScrollbar: false,
footData: [],
footerAffixedBottom: false,
headerAffixedTop: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data | Array | [] | table data。Typescript: `Array<T>` | N
disableDataPage | Boolean | false | \- | N
disableSpaceInactiveRow | Boolean | undefined | can not set row to be inactive with Space keydown | N
empty | TNode | '' | empty text or empty element。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
enableLockScrollbar | Boolean | false | \- | N
firstFullRow | TNode | - | Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
fixedRows | Array | - | Typescript: `Array<number>` | N
footData | Array | [] | table foot data。Typescript: `Array<T>` | N
Expand All @@ -44,7 +45,7 @@ resizable | Boolean | false | allow to resize column width, set `tableLayout=fix
rowAttributes | Object / Array / Function | - | `tr` attributes。Typescript: `TableRowAttributes<T>` `type TableRowAttributes<T> = HTMLElementAttributes \| ((params: { row: T; rowIndex: number; type: 'body' \| 'foot' }) => HTMLElementAttributes) \| Array<TableRowAttributes<T>>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
rowClassName | String / Object / Array / Function | - | table `th` classname。Typescript: `ClassName \| ((params: RowClassNameParams<T>) => ClassName)` `interface RowClassNameParams<T> { row: T; rowIndex: number; rowKey?: string; type?: 'body' \| 'foot' }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
rowKey | String | 'id' | required。unique key for each row data | Y
rowspanAndColspan | Function | - | rowspan and colspan。Typescript: `TableRowspanAndColspanFunc<T>` `type TableRowspanAndColspanFunc<T> = (params: BaseTableCellParams<T>) => RowspanColspan` `interface RowspanColspan { colspan?: number; rowspan?: number }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
rowspanAndColspan | Function | - | rowspan and colspan。Typescript: `TableRowspanAndColspanFunc<T>` `type TableRowspanAndColspanFunc<T extends TableRowData = TableRowData> = (params: BaseTableCellParams<T>) => RowspanColspan` `interface RowspanColspan { colspan?: number; rowspan?: number }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
rowspanAndColspanInFooter | Function | - | rowspan and colspan for footer。Typescript: `TableRowspanAndColspanFunc<T>` | N
scroll | Object | - | lazy load and virtual scroll。Typescript: `TScroll`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
showHeader | Boolean | true | show table header | N
Expand All @@ -56,7 +57,7 @@ topContent | TNode | - | Typescript: `string \| TNode`。[see more ts definition
verticalAlign | String | middle | vertical align。options: top/middle/bottom | N
onActiveChange | Function | | Typescript: `(activeRowKeys: Array<string \| number>, context: ActiveChangeContext<T>) => void`<br/>trigger on row active change。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts)。<br/>`interface ActiveChangeContext<T> { activeRowList: Array<{ row: T, rowIndex: number }>; currentRowData?: T; type: 'active' \| 'inactive' }`<br/> | N
onActiveRowAction | Function | | Typescript: `(context: ActiveRowActionContext<T>) => void`<br/>keyboard operation event actions. used to mock selection behavior, just like macOS or windows。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts)。<br/>`interface ActiveRowActionContext<T> { action: ActiveRowActionType, activeRowList: Array<{ row: T, rowIndex: number }> }`<br/><br/>`type ActiveRowActionType ='shift-area-selection' \| 'space-one-selection' \| 'clear' \| 'select-all'`<br/> | N
onCellClick | Function | | Typescript: `(context: BaseTableCellEventContext<T>) => void`<br/>trigger on cell clicked。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts)。<br/>`interface BaseTableCellEventContext<T> { row: T; col: BaseTableCol; rowIndex: number; colIndex: number; e: MouseEvent }`<br/> | N
onCellClick | Function | | Typescript: `(context: BaseTableCellEventContext<T>) => void`<br/>trigger on cell clicked。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts)。<br/>`interface BaseTableCellEventContext<T extends TableRowData = TableRowData> { row: T; col: BaseTableCol<T>; rowIndex: number; colIndex: number; e: MouseEvent }`<br/> | N
onColumnResizeChange | Function | | Typescript: `(context: { columnsWidth: { [colKey: string]: number }; }) => void`<br/> | N
onPageChange | Function | | Typescript: `(pageInfo: PageInfo, newDataSource: Array<T>) => void`<br/>trigger on pagination changing | N
onRowClick | Function | | Typescript: `(context: RowEventContext<T>) => void`<br/>trigger on row click。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts)。<br/>`interface RowEventContext<T> { row: T; index: number; e: MouseEvent \| KeyboardEvent }`<br/> | N
Expand Down Expand Up @@ -88,7 +89,7 @@ align | String | left | align type。options: left/right/center | N
attrs | Object / Function | - | html attributes。Typescript: `BaseTableColumnAttributes<T>` `type BaseTableColumnAttributes<T> = { [key: string]: any } \| ((context: CellData<T>) => { [key: string]: any })`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
cell | String / Function | - | use cell to render table cell。Typescript: `string \| TNode<BaseTableCellParams<T>>` `interface BaseTableCellParams<T> { row: T; rowIndex: number; col: BaseTableCol<T>; colIndex: number }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
children | Array | - | grouping table head。Typescript: `Array<BaseTableCol<T>>` | N
className | String / Object / Array / Function | - | cell classnames。Typescript: `TableColumnClassName<T> \| TableColumnClassName<T>[]` `type TableColumnClassName<T> = ClassName \| ((context: CellData<T>) => ClassName)` `interface CellData<T> extends BaseTableCellParams<T> { type: 'th' \| 'td' }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
className | String / Object / Array / Function | - | cell classnames。Typescript: `TableColumnClassName<T> \| TableColumnClassName<T>[]` `type TableColumnClassName<T extends TableRowData = TableRowData> = ClassName \| ((context: CellData<T>) => ClassName)` `interface CellData<T extends TableRowData = TableRowData> extends BaseTableCellParams<T> { type: 'th' \| 'td' }`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
colKey | String | - | unique key for column | N
colspan | Number | - | one line head colspan | N
ellipsis | TNode | false | ellipsis cell content。Typescript: `boolean \| TNode<BaseTableCellParams<T>> \| TooltipProps \| { props: TooltipProps; content: TNode<BaseTableCellParams<T>> }`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/table/type.ts) | N
Expand Down
Loading