From 97e2800e50265305dca481be43ade0744dc1da35 Mon Sep 17 00:00:00 2001 From: wisonic Date: Wed, 7 Jan 2026 15:58:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=97=A5=E6=9C=9F=E5=AD=97=E6=AE=B5=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=E5=88=A4=E7=A9=BA=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=20#17710?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-pivot.ts | 8 ++++---- .../chart/components/js/panel/common/common_table.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts index 64ed29ac34..272f784080 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts @@ -268,11 +268,11 @@ export class TablePivot extends S2ChartView { // 默认展开层级 if (basicStyle.tableLayoutMode === 'tree') { const { defaultExpandLevel } = basicStyle - if (isNumber(defaultExpandLevel)) { - if (defaultExpandLevel >= chart.xAxis.length) { - s2Options.style.rowExpandDepth = defaultExpandLevel + if (isNumeric(defaultExpandLevel)) { + if ((defaultExpandLevel as number) >= chart.xAxis.length) { + s2Options.style.rowExpandDepth = defaultExpandLevel as number } else { - s2Options.style.rowExpandDepth = defaultExpandLevel - 2 + s2Options.style.rowExpandDepth = (defaultExpandLevel as number) - 2 } } if (defaultExpandLevel === 'all') { diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts index a3b162ce17..06f7e07f08 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts @@ -813,7 +813,7 @@ export function mappingColor(value, defaultColor, field, type, filedValueMap?, r } else { const fc = field.conditions[i] if (fc.term === 'null') { - if (value === null && value === undefined && value === '') { + if (value === null || value === undefined || value === '') { color = fc[type] flag = true }