Merge pull request #12583 from dataease/pr@dev-v2@chart-table-threshold-style

style(图表): 配置表格条件样式时,背景色默认配置为单元格的背景色 #12055
This commit is contained in:
jianneng-fit2cloud 2024-10-09 13:07:35 +08:00 committed by GitHub
commit d03a9d754f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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