fix export

This commit is contained in:
xuliangzhan
2024-07-08 17:57:33 +08:00
parent fa4169cead
commit 852e4d95c2
2 changed files with 3 additions and 4 deletions

View File

@@ -122,7 +122,6 @@ function exportXLSX (params: VxeGlobalInterceptorHandles.InterceptorExportParams
const { rowHeight } = reactData
const { message, sheetName, isHeader, isFooter, isMerge, isColgroup, original, useStyle, sheetMethod } = options
const columnOpts = computeColumnOpts.value
const _isCustomColumn: boolean = (options as any)._isCustomColumn
const showMsg = message !== false
const mergeCells = $table.getMergeCells()
const colList: any[] = []
@@ -173,7 +172,7 @@ function exportXLSX (params: VxeGlobalInterceptorHandles.InterceptorExportParams
beforeRowCount += colList.length
}
// 处理合并
if (isMerge && !_isCustomColumn) {
if (isMerge) {
mergeCells.forEach(mergeItem => {
const { row: mergeRowIndex, rowspan: mergeRowspan, col: mergeColIndex, colspan: mergeColspan } = mergeItem
sheetMerges.push({
@@ -196,7 +195,7 @@ function exportXLSX (params: VxeGlobalInterceptorHandles.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": "4.0.4",
"version": "4.0.5",
"description": "基于 vxe-table 表格的扩展插件,支持导出 xlsx 格式",
"scripts": {
"lib": "gulp build"