fix(dashboard): use global.name.value for Vuetify 3 theme change

This commit is contained in:
LIghtJUNction
2026-04-02 22:22:34 +08:00
parent 582a63b79e
commit 5f701a75c7
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ watch(
() => customizer.uiTheme,
(newTheme) => {
if (newTheme) {
theme.change(newTheme);
theme.global.name.value = newTheme;
}
},
{ immediate: true },

View File

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