From 5f701a75c705b726fb95765ff85b741f492bc0a4 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Thu, 2 Apr 2026 22:22:34 +0800 Subject: [PATCH] fix(dashboard): use global.name.value for Vuetify 3 theme change --- dashboard/src/App.vue | 2 +- dashboard/src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src/App.vue b/dashboard/src/App.vue index ab58fa471..ab95499e0 100644 --- a/dashboard/src/App.vue +++ b/dashboard/src/App.vue @@ -45,7 +45,7 @@ watch( () => customizer.uiTheme, (newTheme) => { if (newTheme) { - theme.change(newTheme); + theme.global.name.value = newTheme; } }, { immediate: true }, diff --git a/dashboard/src/main.ts b/dashboard/src/main.ts index 0f7fed83a..36f07905c 100644 --- a/dashboard/src/main.ts +++ b/dashboard/src/main.ts @@ -47,7 +47,7 @@ async function mountApp(app: any, pinia: any, waitForRouter = true) { // 挂载后同步 Vuetify 主题 const customizer = useCustomizerStore(pinia); - vuetify.theme.change(customizer.uiTheme); + vuetify.theme.global.name.value = customizer.uiTheme; const storedPrimary = localStorage.getItem("themePrimary"); const storedSecondary = localStorage.getItem("themeSecondary"); if (storedPrimary || storedSecondary) {