diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 95a9046390..05e2de9579 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -1045,7 +1045,10 @@ export default { tableChart.customAttr.color.tableHeaderFontColor = '#7c7e81' tableChart.customAttr.color.tableFontColor = '#7c7e81' tableChart.customAttr.color.enableTableCrossBG = false + tableChart.customAttr.size.showTableHeader = true } + tableChart.customAttr.size.tableColumnFreezeHead = 0 + tableChart.customAttr.size.tableRowFreezeHead = 0 tableChart.customAttr.color.tableStripe = true tableChart.customAttr.size.tablePageMode = 'pull' tableChart.customStyle.text.show = false 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 } }) }