From 4f737e0b137f984cbe349df86b0aaccbcb254dc6 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Fri, 29 Dec 2023 15:04:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E8=A1=A8=E6=A0=BC):=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=96=91=E9=A9=AC=E7=BA=B9=E5=9C=A8=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E9=98=88=E5=80=BC=E5=90=8E=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/chart/table/table-info.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/core/frontend/src/views/chart/chart/table/table-info.js b/core/frontend/src/views/chart/chart/table/table-info.js index 40955fb143..bf9b4a3d16 100644 --- a/core/frontend/src/views/chart/chart/table/table-info.js +++ b/core/frontend/src/views/chart/chart/table/table-info.js @@ -576,7 +576,12 @@ function getConditions(chart) { if (customAttr.color) { const c = JSON.parse(JSON.stringify(customAttr.color)) valueColor = c.tableFontColor - valueBgColor = hexColorToRGBA(c.tableItemBgColor, c.alpha) + const enableTableCrossBG = c.enableTableCrossBG + if (!enableTableCrossBG) { + valueBgColor = hexColorToRGBA(c.tableItemBgColor, c.alpha) + } else { + valueBgColor = null + } } } @@ -594,9 +599,12 @@ function getConditions(chart) { res.background.push({ field: field.field.dataeaseName, mapping(value, rowData) { - return { - fill: mappingColor(value, valueBgColor, field, 'backgroundColor', filedValueMap, rowData) + const fill = mappingColor(value, valueBgColor, field, 'backgroundColor', filedValueMap, rowData) + if (fill) { + return { fill } } + // 返回 null 会使用主题中的背景色 + return null } }) }