File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed
docs/src/document/zh-CN/components
packages/component/component/table Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -988,6 +988,7 @@ const defaultToolbars = [
988
988
| ignoreExport | 忽略导出 | ` boolean` | ` false` | ` true` ` false` | ` 2.10.0` |
989
989
| totalRow | 开启统计(传` number` ` string` 则直接展示) | ` boolean` ` string` ` number` | ` false` | | |
990
990
| totalRowMethod | 自定义统计 | ` function` 参数{column, dataSource } | | | |
991
+ | exportCellType | ` DefaultToolbar.export` 导出控制单元格类型 | ` string` | ` x:str` | [type ](https: // learn.microsoft.com/en-us/previous-versions/office/developer/office-xp/aa140066(v=office.10)) | |
991
992
992
993
:::
993
994
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export function useToolBar(props: TableToolBarType) {
85
85
// 则不再进行结构拼接。
86
86
if ( rowspan !== 0 && colspan !== 0 ) {
87
87
const text = columnData ? columnData [ tableColumn . key ] : "" ;
88
- const xType = isNumber ( text ) ? "ss:Type='Number'" : "x:str" ;
88
+ const xType = tableColumn . exportCellType ?? ( isNumber ( text ) ? "ss:Type='Number'" : "x:str" ) ;
89
89
90
90
tableStr += `<td colspan=${ colspan } rowspan=${ rowspan } ${ xType } >${ text } </td>` ;
91
91
}
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ interface TableBaseColumn {
94
94
column : TableColumn ,
95
95
dataSource : TableProps [ "dataSource" ]
96
96
) => void ;
97
+ exportCellType ?: string ;
97
98
}
98
99
99
100
export type TableColumn =
You can’t perform that action at this time.
0 commit comments