Skip to content

Commit 111d9d9

Browse files
committed
fix: component titleColor
1 parent c852bce commit 111d9d9

8 files changed

Lines changed: 22 additions & 24 deletions

File tree

src/frontend/platform/src/pages/Dashboard/colorSchemes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ export const getDefaultMetricStyle = (title, subtitle) => ({
521521
"showSubtitle": true,
522522
title,
523523
"titleFontSize": 14,
524-
"titleColor": "#0F172A",
524+
"titleColor": "",
525525
"titleAlign": "left",
526526
"titleBold": false,
527527
"titleItalic": false,

src/frontend/platform/src/pages/Dashboard/components/charts/BaseChart.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ export function BaseChart({ isDark, data, chartType, dataConfig, styleConfig }:
8787
chartRef.current = null
8888
}
8989

90-
console.log('render echarts :>> ');
91-
9290
try {
9391
// theme
9492
const theme = styleConfig.themeColor || 'professional-blue'

src/frontend/platform/src/pages/Dashboard/components/charts/MetricCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export function MetricCard({ title: indicatorName, data, isPreviewMode, dataConf
167167
const maxSubtitleHeight = subtitleLineHeight * 4
168168

169169
return (
170-
<div className="group h-full flex flex-col select-none py-1 px-2 pr-1">
170+
<div className="group h-full flex flex-col select-none py-1 px-2 pr-1 text-foreground dark:text-gray-400">
171171
{/* title - single line */}
172172
<div style={titleStyle} className='truncate mb-1 pr-1'>{indicatorName}</div>
173173

src/frontend/platform/src/pages/Dashboard/components/config/ComponentConfigDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const FULL_DEFAULT_STYLE_CONFIG: ComponentStyleConfig = {
3535
titleUnderline: false,
3636
titleStrikethrough: false,
3737
titleAlign: "left",
38-
titleColor: "#000000",
38+
titleColor: "",
3939

4040
xAxisTitle: "",
4141
xAxisFontSize: 14,

src/frontend/platform/src/pages/Dashboard/components/config/FilterConditionDialog.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,21 +393,21 @@ export function FilterConditionDialog({
393393
}, [dimensions, fields, t]);
394394
// 过滤掉时间字段
395395
const filteredFields = useMemo(() => {
396-
console.log('原始字段数据:', fields)
396+
// console.log('原始字段数据:', fields)
397397
if (!dataset_code || !dimensions || !fields) return []
398398

399399
return fields.filter(field => {
400400
if (!field || !field.fieldCode || !field.displayName) {
401-
console.log('发现无效字段:', field)
401+
// console.log('发现无效字段:', field)
402402
return false
403403
}
404404
if (field.isVirtual === true) {
405-
console.log('过滤虚拟指标:', field.displayName)
405+
// console.log('过滤虚拟指标:', field.displayName)
406406
return false
407407
}
408408
const lowerCode = field.fieldCode.toLowerCase()
409409
const lowerName = field.displayName.toLowerCase()
410-
console.log('检查字段:', field.displayName, 'lowerCode:', lowerCode, 'lowerName:', lowerName)
410+
// console.log('检查字段:', field.displayName, 'lowerCode:', lowerCode, 'lowerName:', lowerName)
411411

412412
// 检查是否包含时间相关关键词
413413
const isTimeField = lowerCode.includes('time') ||

src/frontend/platform/src/pages/Dashboard/components/config/useChartState.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function useChartState(initialComponent: DashboardComponent) {
6666

6767
// 初始化维度数据
6868
if (dc) {
69-
console.log('数据配置:', dc)
69+
// console.log('数据配置:', dc)
7070

7171
const newCategoryDimensions: any[] = []
7272
const newStackDimensions: any[] = []
@@ -168,7 +168,7 @@ export function useChartState(initialComponent: DashboardComponent) {
168168
fieldOrderIds = dc.fieldOrder
169169
.map(item => fieldIdToComponentId.get(item.fieldId))
170170
.filter(Boolean) as string[]
171-
console.log('使用 data_config.fieldOrder 映射后的 componentIds:', fieldOrderIds)
171+
// console.log('使用 data_config.fieldOrder 映射后的 componentIds:', fieldOrderIds)
172172
}
173173

174174
// 如果没有 fieldOrder 或映射失败,使用默认顺序
@@ -179,11 +179,11 @@ export function useChartState(initialComponent: DashboardComponent) {
179179
...newValueDimensions.map(d => d.id)
180180
]
181181
fieldOrderIds = allComponentIds
182-
console.log('使用默认字段顺序:', fieldOrderIds)
182+
// console.log('使用默认字段顺序:', fieldOrderIds)
183183
}
184184

185185
setSortPriorityOrder(fieldOrderIds)
186-
console.log('设置 sortPriorityOrder:', fieldOrderIds)
186+
// console.log('设置 sortPriorityOrder:', fieldOrderIds)
187187
}
188188
}
189189

@@ -639,7 +639,7 @@ export function useChartState(initialComponent: DashboardComponent) {
639639
};
640640
}
641641

642-
console.log('最终 numberFormat:', numberFormat);
642+
// console.log('最终 numberFormat:', numberFormat);
643643

644644
return {
645645
fieldId: metric.fieldId,
@@ -708,14 +708,14 @@ export function useChartState(initialComponent: DashboardComponent) {
708708
}
709709
}) : []
710710

711-
console.log('生成数据配置:', {
712-
dimensions,
713-
stackDimension,
714-
metrics,
715-
fieldOrder,
716-
filters,
717-
hasStack: stackDimensions.length > 0
718-
})
711+
// console.log('生成数据配置:', {
712+
// dimensions,
713+
// stackDimension,
714+
// metrics,
715+
// fieldOrder,
716+
// filters,
717+
// hasStack: stackDimensions.length > 0
718+
// })
719719

720720
return {
721721
dimensions,

src/frontend/platform/src/pages/Dashboard/components/editor/ComponentWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const ComponentWrapper = memo(({
101101
const createTitleStyle = (config) => {
102102
const defaultConfig = {
103103
titleFontSize: 16,
104-
titleColor: "#000000",
104+
titleColor: "",
105105
titleAlign: "left",
106106
titleBold: false,
107107
titleItalic: false,

src/frontend/platform/src/store/dashboardStore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,5 +716,5 @@ export const useComponentEditorStore = create<ComponentEditorState>((set, get) =
716716
}));
717717

718718
const debugLog = (msg: string) => {
719-
console.log('【savechange】 :>> ', msg);
719+
// console.log('【savechange】 :>> ', msg);
720720
}

0 commit comments

Comments
 (0)