mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #13059 from dataease/pr@dev-v2@refactor_table_info_merge_cells_index
refactor(图表): 明细表合并单元格序号列处理
This commit is contained in:
commit
8b7da76ed5
@ -1464,6 +1464,16 @@ export function configMergeCells(chart: Chart, options: S2Options) {
|
||||
}
|
||||
})
|
||||
})
|
||||
if (showIndex) {
|
||||
const indexMergedCells = mergedCellsInfo.filter(cells => cells[0].colIndex === 1)
|
||||
indexMergedCells.forEach(cells => {
|
||||
const tmpCells = cloneDeep(cells)
|
||||
tmpCells.forEach(cell => {
|
||||
cell.colIndex = 0
|
||||
})
|
||||
mergedCellsInfo.unshift(tmpCells)
|
||||
})
|
||||
}
|
||||
options.mergedCellsInfo = mergedCellsInfo
|
||||
options.mergedCell = (sheet, cells, meta) => {
|
||||
return new CustomMergedCell(sheet, cells, meta)
|
||||
@ -1486,4 +1496,4 @@ class CustomMergedCell extends MergedCell {
|
||||
lineHeight: cellTheme.horizontalBorderWidth,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user