fix export

This commit is contained in:
xuliangzhan
2024-07-08 17:54:21 +08:00
parent fd3e3fa9b0
commit fd9e87c0c8
2 changed files with 3 additions and 4 deletions

View File

@@ -119,7 +119,6 @@ function exportXLSX (params: InterceptorExportParams) {
const { $vxe, rowHeight, headerAlign: allHeaderAlign, align: allAlign, footerAlign: allFooterAlign, columnOpts } = $table
const { modal, t } = $vxe
const { message, sheetName, isHeader, isFooter, isMerge, isColgroup, original, useStyle, sheetMethod } = options
const _isCustomColumn: boolean = (options as any)._isCustomColumn
const showMsg = message !== false
const mergeCells = $table.getMergeCells()
const colList: any[] = []
@@ -170,7 +169,7 @@ function exportXLSX (params: InterceptorExportParams) {
beforeRowCount += colList.length
}
// 处理合并
if (isMerge && !_isCustomColumn) {
if (isMerge) {
mergeCells.forEach(mergeItem => {
const { row: mergeRowIndex, rowspan: mergeRowspan, col: mergeColIndex, colspan: mergeColspan } = mergeItem
sheetMerges.push({
@@ -193,7 +192,7 @@ function exportXLSX (params: InterceptorExportParams) {
const footers = getFooterData(options, footerData)
const mergeFooterItems = $table.getMergeFooterItems()
// 处理合并
if (isMerge && !_isCustomColumn) {
if (isMerge) {
mergeFooterItems.forEach(mergeItem => {
const { row: mergeRowIndex, rowspan: mergeRowspan, col: mergeColIndex, colspan: mergeColspan } = mergeItem
sheetMerges.push({

View File

@@ -1,6 +1,6 @@
{
"name": "vxe-table-plugin-export-xlsx",
"version": "3.3.1",
"version": "3.3.2",
"description": "基于 vxe-table 表格的扩展插件,支持导出 xlsx 格式",
"scripts": {
"lib": "gulp build"