From 6eabeb09c9ead6751ad3633ebb76d7a78d3938ac Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 22 Mar 2025 09:53:21 +0800 Subject: [PATCH] fix #293 --- src/components/dialog/SiteUserDataDialog.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/components/dialog/SiteUserDataDialog.vue b/src/components/dialog/SiteUserDataDialog.vue index 11614f7e..8365c16e 100644 --- a/src/components/dialog/SiteUserDataDialog.vue +++ b/src/components/dialog/SiteUserDataDialog.vue @@ -54,6 +54,8 @@ const historyChartOptions = computed(() => { parentHeightOffset: 0, toolbar: { show: false }, animations: { enabled: true }, + background: currentTheme.value.surface, // 新增背景色同步 + foreColor: currentTheme.value.onSurface, // 新增文字颜色同步 dataLabels: { enabled: true, }, @@ -61,6 +63,9 @@ const historyChartOptions = computed(() => { autoScaleYaxis: true, }, }, + theme: { + mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式 + }, tooltip: { enabled: true, tooltip: { @@ -68,6 +73,10 @@ const historyChartOptions = computed(() => { format: 'dd MMM yyyy', }, }, + style: { + background: currentTheme.value.background, // 提示框背景色同步 + color: currentTheme.value.onBackground, // 文字颜色同步 + }, }, grid: { xaxis: { @@ -140,10 +149,15 @@ const seedingChartOptions = computed(() => { parentHeightOffset: 0, toolbar: { show: false }, animations: { enabled: true }, + background: currentTheme.value.surface, // 新增背景色同步 + foreColor: currentTheme.value.onSurface, // 新增文字颜色同步 zoom: { autoScaleYaxis: true, }, }, + theme: { + mode: vuetifyTheme.global.current.value.dark ? 'dark' : 'light', // 同步主题模式 + }, tooltip: { enabled: true, x: { @@ -151,6 +165,10 @@ const seedingChartOptions = computed(() => { return '数量:' + val.toLocaleString() }, }, + style: { + background: currentTheme.value.background, // 提示框背景色同步 + color: currentTheme.value.onBackground, // 文字颜色同步 + }, }, grid: { xaxis: {