From dc929b1273b1cef5c8f44776841afc74917fe784 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sat, 28 Sep 2024 13:00:28 +0800 Subject: [PATCH] releases 4.0.4 --- index.ts | 10 +++++++--- package.json | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.ts b/index.ts index b0e9834..f5d94c5 100644 --- a/index.ts +++ b/index.ts @@ -33,9 +33,13 @@ function getCellText (cellValue: any) { return cellValue || ' ' } -function getFooterCellValue ($table: VxeTableConstructor, opts: VxeTablePropTypes.ExportConfig, rows: any[], column: VxeTableDefines.ColumnInfo) { - const cellValue = XEUtils.toValueString(rows[$table.getVTColumnIndex(column)]) - return getCellText(cellValue) +function getFooterCellValue ($xeTable: VxeTableConstructor, opts: VxeTablePropTypes.ExportConfig, row: any, column: VxeTableDefines.ColumnInfo) { + const _columnIndex = $xeTable.getVTColumnIndex(column) + // 兼容老模式 + if (XEUtils.isArray(row)) { + return getCellText(row[_columnIndex]) + } + return getCellText(XEUtils.get(row, column.field)) } function getFooterData (opts: VxeTablePropTypes.ExportConfig, footerData: any[][]) { diff --git a/package.json b/package.json index 44838b4..b026226 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table-plugin-export-pdf", - "version": "4.0.3", + "version": "4.0.4", "description": "基于 vxe-table 表格的扩展插件,支持导出 pdf 格式", "scripts": { "lib": "gulp build" @@ -53,7 +53,7 @@ "sass": "^1.55.0", "typescript": "^4.6.4", "vue": "^3.4.27", - "vxe-table": "^4.6.17" + "vxe-table": "^4.6.19" }, "peerDependencies": { "vxe-table": "^4.5.0"