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 }