From 77fb8dcf41f0b15f95effe07d8da91d22f9e3ab4 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 9 Oct 2024 13:06:52 +0800 Subject: [PATCH] =?UTF-8?q?style(=E5=9B=BE=E8=A1=A8):=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=9D=A1=E4=BB=B6=E6=A0=B7=E5=BC=8F=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=83=8C=E6=99=AF=E8=89=B2=E9=BB=98=E8=AE=A4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E5=8D=95=E5=85=83=E6=A0=BC=E7=9A=84=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2=20#12055?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/dialog/TableThresholdEdit.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue index 4af2ca5efa..dc4a514edb 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/TableThresholdEdit.vue @@ -7,6 +7,7 @@ import { useI18n } from '@/hooks/web/useI18n' import { COLOR_PANEL } from '../../../util/chart' import { fieldType } from '@/utils/attr' import { iconFieldMap } from '@/components/icon-group/field-list' +import { cloneDeep } from 'lodash-es' const { t } = useI18n() @@ -229,7 +230,13 @@ const changeThreshold = () => { } const addConditions = item => { - item.conditions.push(JSON.parse(JSON.stringify(thresholdCondition))) + const newCondition = JSON.parse(JSON.stringify(thresholdCondition)) + // 获取单元格默认背景颜色 + const tableCell = props.chart?.customAttr?.tableCell + if (tableCell) { + newCondition.backgroundColor = cloneDeep(tableCell.tableItemBgColor) + } + item.conditions.push(newCondition) changeThreshold() } const removeCondition = (item, index) => {