mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
Improve type definition and doc of TableComponents
This commit is contained in:
parent
176a8dfcda
commit
306bce385b
@ -16,7 +16,7 @@ interface BodyRowState {
|
||||
|
||||
export interface BodyRowClass extends React.ComponentClass {}
|
||||
|
||||
export default function createTableRow(Component = 'tr') {
|
||||
export default function createTableRow(Component: React.ReactType = 'tr') {
|
||||
class BodyRow extends React.Component<BodyRowProps, BodyRowState> {
|
||||
private store: Store;
|
||||
private unsubscribe: () => void;
|
||||
|
@ -55,7 +55,7 @@ const columns = [{
|
||||
| bordered | Whether to show all table borders | boolean | `false` |
|
||||
| childrenColumnName | The column contains children to display | string\[] | children |
|
||||
| columns | Columns of table | [ColumnProps](https://git.io/vMMXC)\[] | - |
|
||||
| components | Override default table elements | object | - |
|
||||
| components | Override default table elements | [TableComponents](https://git.io/fANxz) | - |
|
||||
| dataSource | Data record array to be displayed | any\[] | - |
|
||||
| defaultExpandAllRows | Expand all rows initially | boolean | `false` |
|
||||
| defaultExpandedRowKeys | Initial expanded row keys | string\[] | - |
|
||||
|
@ -60,7 +60,7 @@ const columns = [{
|
||||
| bordered | 是否展示外边框和列边框 | boolean | false |
|
||||
| childrenColumnName | 指定树形结构的列名 | string\[] | children |
|
||||
| columns | 表格列的配置描述,具体项见下表 | [ColumnProps](https://git.io/vMMXC)\[] | - |
|
||||
| components | 覆盖默认的 table 元素 | object | - |
|
||||
| components | 覆盖默认的 table 元素 | [TableComponents](https://git.io/fANxz) | - |
|
||||
| dataSource | 数据数组 | any\[] | |
|
||||
| defaultExpandAllRows | 初始时,是否展开所有行 | boolean | false |
|
||||
| defaultExpandedRowKeys | 默认展开的行 | string\[] | - |
|
||||
|
@ -37,16 +37,16 @@ export interface ColumnProps<T> {
|
||||
}
|
||||
|
||||
export interface TableComponents {
|
||||
table?: any;
|
||||
table?: React.ReactType;
|
||||
header?: {
|
||||
wrapper?: any;
|
||||
row?: any;
|
||||
cell?: any;
|
||||
wrapper?: React.ReactType;
|
||||
row?: React.ReactType;
|
||||
cell?: React.ReactType;
|
||||
};
|
||||
body?: {
|
||||
wrapper?: any;
|
||||
row?: any;
|
||||
cell?: any;
|
||||
wrapper?: React.ReactType;
|
||||
row?: React.ReactType;
|
||||
cell?: React.ReactType;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user