From 83b4f89c65e661e5cd612a674bda3b7738693124 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sat, 28 Sep 2024 12:59:56 +0800 Subject: [PATCH] releases 3.3.4 --- index.ts | 10 +++++++--- package.json | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index.ts b/index.ts index a635029..7cf82c9 100644 --- a/index.ts +++ b/index.ts @@ -37,9 +37,13 @@ function getFooterData (opts: any, footerData: any[][]) { return footerFilterMethod ? footerData.filter((items, index) => footerFilterMethod({ items, $rowIndex: index })) : footerData } -function getFooterCellValue ($table: any, opts: any, rows: any[], column: any) { - const cellValue = getCellLabel(column, rows[$table.getVMColumnIndex(column)]) - return cellValue +function getFooterCellValue ($xeTable: any, opts: any, row: any, column: any) { + const _columnIndex = $xeTable.getVTColumnIndex(column) + // 兼容老模式 + if (XEUtils.isArray(row)) { + return getCellLabel(column, row[_columnIndex]) + } + return getCellLabel(column, XEUtils.get(row, column.field)) } declare module 'vxe-table' { diff --git a/package.json b/package.json index 761aff1..7fe80cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table-plugin-export-xlsx", - "version": "3.3.3", + "version": "3.3.4", "description": "基于 vxe-table 表格的扩展插件,支持导出 xlsx 格式", "scripts": { "lib": "gulp build"