forked from github/dataease
refactor(图表): 明细表合并单元格序号列处理
This commit is contained in:
parent
a7966d9415
commit
68749291c9
@ -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