style(图表): 配置表格条件样式时,背景色默认配置为单元格的背景色 #12055

This commit is contained in:
jianneng-fit2cloud 2024-10-09 13:06:52 +08:00
parent 148110feb9
commit 77fb8dcf41

View File

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