From bca512304a68c66ec1db83c24691dcf2da6e5d95 Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 14 Oct 2024 11:18:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E8=A1=8C=E5=88=97=E5=86=BB=E7=BB=93=E5=BC=80=E5=85=B3=E6=97=A0?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-info.ts | 8 +++++--- .../components/js/panel/charts/table/table-normal.ts | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts index 4cbec51678..ddaf81371e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts @@ -157,9 +157,11 @@ export class TableInfo extends S2ChartView { tooltip: { getContainer: () => containerDom, renderTooltip: sheet => new SortTooltip(sheet) - }, - frozenColCount: customAttr.tableCell.tableColumnFreezeHead ?? 0, - frozenRowCount: customAttr.tableCell.tableRowFreezeHead ?? 0 + } + } + if (customAttr.tableCell.tableFreeze) { + s2Options.frozenColCount = customAttr.tableCell.tableColumnFreezeHead ?? 0 + s2Options.frozenRowCount = customAttr.tableCell.tableRowFreezeHead ?? 0 } // 开启序号之后,第一列就是序号列,修改 label 即可 if (s2Options.showSeriesNumber) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts index 986eb555ca..90823f487e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts @@ -138,9 +138,11 @@ export class TableNormal extends S2ChartView { tooltip: { getContainer: () => containerDom, renderTooltip: sheet => new SortTooltip(sheet) - }, - frozenColCount: customAttr.tableCell.tableColumnFreezeHead ?? 0, - frozenRowCount: customAttr.tableCell.tableRowFreezeHead ?? 0 + } + } + if (customAttr.tableCell.tableFreeze) { + s2Options.frozenColCount = customAttr.tableCell.tableColumnFreezeHead ?? 0 + s2Options.frozenRowCount = customAttr.tableCell.tableRowFreezeHead ?? 0 } // 开启序号之后,第一列就是序号列,修改 label 即可 if (s2Options.showSeriesNumber) {