1717
1818### CTable 基础配置项
1919
20- | 属性 | 说明 | 类型 | 默认值 |
20+ | 属性 | 说明 | 类型 | 默认值 | |
2121| ---------------- | ------------------------------------------------------------------------------------- | -------------- | --------- | --- |
2222| ajaxData | 表格数据源 | function/array | - | |
2323| columnData | 表格列描述,具体详见下表 ** columnData** | array | - | |
@@ -39,7 +39,7 @@ this.tableRef.current.refreshTable(gotoFirstPage?, params?);
3939
4040_ refreshTable 参数:_
4141
42- | 属性 | 说明 | 类型 | 默认值 |
42+ | 属性 | 说明 | 类型 | 默认值 | |
4343| ------------- | ---------------------------------------------- | ------- | ------ | --- |
4444| gotoFirstPage | 表格刷新后,是否跳转到第一页 | boolean | true | |
4545| params | 分页等表格查询参数(暂不支持传入额外查询参数) | object | {} | |
@@ -50,22 +50,22 @@ this.tableRef.current.setColumn(columnData, isReloadGrid?);
5050
5151_ setColumn 参数:_
5252
53- | 属性 | 说明 | 类型 | 默认值 |
53+ | 属性 | 说明 | 类型 | 默认值 | |
5454| ------------ | ---------------------------------- | ------- | ------ | --- |
5555| columnData | 表格列数组 | array | [ ] | |
5656| isReloadGrid | 重新设置表格列后,是否需要刷新表格 | boolean | false | |
5757
5858### CTable 字段映射
5959
60- | 属性 | 说明 | 类型 | 默认值 |
60+ | 属性 | 说明 | 类型 | 默认值 | |
6161| ----------- | ----------------- | ------ | ---------- | --- |
6262| totalsKey | total 映射字段 | string | 'totals' | |
6363| dataKey | data 映射字段 | string | 'data' | |
6464| childrenKey | children 映射字段 | string | 'children' | |
6565
6666### CTable 分页相关配置
6767
68- | 属性 | 说明 | 类型 | 默认值 |
68+ | 属性 | 说明 | 类型 | 默认值 | |
6969| ----------- | ---------------------------------------------------------------------------------------------- | ------- | ------ | --- |
7070| supportPage | 是否支持分页 | boolean | false | |
7171| pageOpts | 分页信息,详见** Pagination** 组件:https://cloud-react.shuyun.com/v1/cloud-react/nav/pagination | object | - | |
@@ -74,7 +74,7 @@ _setColumn 参数:_
7474
7575### CTable 多级表格配置(树、展开行)
7676
77- | 属性 | 说明 | 类型 | 默认值 |
77+ | 属性 | 说明 | 类型 | 默认值 | |
7878| --------------------- | -------------------------------------------------------------------------- | -------- | ------ | --- |
7979| supportTree | 是否支持树状表格 | boolean | false | |
8080| supportExpend | 是否支持展开 | boolean | false | |
@@ -88,7 +88,7 @@ _setColumn 参数:_
8888
8989### CTable 多选/单选配置
9090
91- | 属性 | 说明 | 类型 | 默认值 |
91+ | 属性 | 说明 | 类型 | 默认值 | |
9292| ----------------- | ----------------------------------------------------------------------------------------------- | -------- | ------ | --- |
9393| supportCheckbox | 是否支持多选 | boolean | false | |
9494| checkedData | 已选数据,支持两种写法。在 "多选表格(checkbox.md)" demo 中查看说明 | array | [ ] | |
@@ -101,7 +101,7 @@ _setColumn 参数:_
101101
102102### CTable 表格拖拽配置
103103
104- | 属性 | 说明 | 类型 | 默认值 |
104+ | 属性 | 说明 | 类型 | 默认值 | |
105105| ------------ | -------------------- | -------- | ------ | --- |
106106| supportDrag | 是否支持表格拖拽行 | bool | false | |
107107| showDragIcon | 是否展示拖拽手柄 | bool | false | |
@@ -110,21 +110,21 @@ _setColumn 参数:_
110110
111111### CTable 表格固定表头
112112
113- | 属性 | 说明 | 类型 | 默认值 |
113+ | 属性 | 说明 | 类型 | 默认值 | |
114114| ------------ | ------------------ | --------------------------------------------------------------------------- | ------ | --- |
115115| sticky | 表头固定 | object { offsetHeader?: number, getContainer?: () => Window / HTMLElement } | {} | |
116116| stickyFooter | 表尾固定在页面底部 | bool | false | |
117117
118118### CTable 表格排序(此处是全局配置,配置每列的排序详看 columnData 配置)
119119
120- | 属性 | 说明 | 类型 | 默认值 |
120+ | 属性 | 说明 | 类型 | 默认值 | |
121121| --------------------- | ----------------------------------------------------------------------- | ------- | ------ | --- |
122122| sortWidthOriginStatus | 表格排序状态分为升序和降序,配置该参数为 true,排序状态可以恢复原始状态 | boolean | false | |
123123| sortMultiColumns | 是否支持多个列同时排序 | boolean | false | |
124124
125125### CTable 表格配置列的显示和隐藏
126126
127- | 属性 | 说明 | 类型 | 默认值 |
127+ | 属性 | 说明 | 类型 | 默认值 | |
128128| --------------------- | -------------------------------------------------------------- | -------- | ------- | --- |
129129| supportConfigColumn | 是否支持列的显示和隐藏 | boolean | false | |
130130| configColumnType | 类型:` default ` ` complex ` | string | default | |
@@ -134,10 +134,11 @@ _setColumn 参数:_
134134| defaultConfigColumns | 默认列(恢复默认操作使用,type 为 ` complex ` 时可用) | Array | [ ] | |
135135| disabledSortColumns | 不可移动顺序的列(只允许设置在列首,type 为 ` complex ` 时可用) | Array | [ ] | |
136136| onColumnChange | 改变列后的回调函数 | function | - | |
137+ | configPanelMaxHeight | 面板最大高度 | number | - | |
137138
138139### CTable 自定义模板配置
139140
140- | 属性 | 说明 | 类型 | 默认值 |
141+ | 属性 | 说明 | 类型 | 默认值 | |
141142| --------------- | ------------------------------------------------------------------------------------------------------------ | -------------------- | --------- | --- |
142143| footerTpl | 自定义 footer | function | - | |
143144| footerHeight | 分页部分高度,设置 footerTpl,需要设置 footerHeight | number | undefined | |
@@ -153,7 +154,7 @@ _setColumn 参数:_
153154
154155### CTable 业务相关配置
155156
156- | 属性 | 说明 | 类型 | 默认值 |
157+ | 属性 | 说明 | 类型 | 默认值 | |
157158| -------------------- | ---------------------------------------------------------- | ------- | ------ | --- |
158159| isDelay | 刷新表格时,是否延迟 loading,一般在纯前端表格中使用 | boolean | false | |
159160| isCheckboxFixed | 是否固定多选框列或单选框列 | boolean | false | |
@@ -167,7 +168,7 @@ _setColumn 参数:_
167168
168169### CTable 其他功能配置
169170
170- | 属性 | 说明 | 类型 | 默认值 |
171+ | 属性 | 说明 | 类型 | 默认值 | |
171172| ------------------- | ---------------------------------------------------------------- | ------- | ------ | --- |
172173| supportResizeColumn | 是否支持配置列的拉伸 | boolean | false | |
173174| summaryData | 表格合计(API 同 columnData) | array | [ ] | |
@@ -238,6 +239,7 @@ _setColumn 参数:_
238239| ------------------- | -------------------------------------------- | --------------------------- | ---------------- |
239240| value | 展示值,使用组件的形式必传,使用 typeConfig 忽略此字段 | string | - |
240241| typeConfig.line | 展示行数 | number | 1 |
242+ | typeConfig.tooltipValue | 如果不想让 tooltip 展示 value 的值,可以单独配置 tooltipValue | string | - |
241243
242244** (5)type 为 链接类型-` LINK ` **
243245(_ 可根据下表配置 typeConfig,查看 [ Demo] ( https://cloud-react.shuyun.com/v1/cloud-react/data/c-table#标准化表格-文本类型 ) ;也可以使用组件形式 <Table.LinkTpl/>,查看 [ Demo] ( https://cloud-react.shuyun.com/v1/cloud-react/data/c-table#标准化表格-使用列模板形式 ) _ )
@@ -248,6 +250,7 @@ _setColumn 参数:_
248250| typeConfig.linkKey | 链接 key(取自 row 中的字段) | string | '' |
249251| typeConfig.link | 链接值 | string | '' |
250252| typeConfig.onClick | 点击链接的回调函数 | func | - |
253+ | typeConfig.tooltipValue | 如果不想让 tooltip 展示 value 的值,可以单独配置 tooltipValue | string | - |
251254
252255** (6)type 为 标签类型-` TAG ` **
253256(_ 可根据下表配置 typeConfig,查看 [ Demo] ( https://cloud-react.shuyun.com/v1/cloud-react/data/c-table#标准化表格-标签类型 ) ;也可以使用组件形式 <Table.TagTpl/>,查看 [ Demo] ( https://cloud-react.shuyun.com/v1/cloud-react/data/c-table#标准化表格-使用列模板形式 ) _ )
0 commit comments