fix(图表): 修复透视表自定义汇总名称失效

This commit is contained in:
wisonic-s
2025-08-28 17:52:39 +08:00
committed by wisonic-s
parent dc52a945e3
commit 94824fdd04
2 changed files with 3 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ export class TableInfo extends S2ChartView<TableSheet> {
const lastNode = ev.colLeafNodes[ev.colLeafNodes.length - 1]
lastNode.width = Math.floor(lastNode.width - (totalWidth - containerWidth))
}
ev.colsHierarchy.width = containerWidth - 1
ev.colsHierarchy.width = containerWidth - 2
})
}
// 空数据时表格样式

View File

@@ -475,7 +475,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
s2Options.layoutCoordinate = (_, __, col) => {
if (col?.isGrandTotals) {
if (colTotalCfgMap[col.value]?.label) {
col.label = colTotalCfgMap[col.value].label
col.value = colTotalCfgMap[col.value].label
}
}
}
@@ -494,7 +494,7 @@ export class TablePivot extends S2ChartView<PivotSheet> {
s2Options.layoutCoordinate = (_, row, __) => {
if (row?.isGrandTotals) {
if (rowTotalCfgMap[row.value]?.label) {
row.label = rowTotalCfgMap[row.value].label
row.value = rowTotalCfgMap[row.value].label
}
}
}