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) {