🐛 Fixed theme and packaging issues

This commit is contained in:
2025-06-21 15:33:50 +08:00
parent 1153c0a652
commit a92e5486b2
8 changed files with 23 additions and 11 deletions

View File

@@ -23,6 +23,12 @@ export const useThemeStore = defineStore('theme', () => {
);
};
// 初始化主题
const initializeTheme = () => {
const theme = configStore.config?.appearance?.systemTheme || SystemThemeType.SystemThemeAuto;
applyThemeToDOM(theme);
};
// 设置主题
const setTheme = async (theme: SystemThemeType) => {
await configStore.setSystemTheme(theme);
@@ -32,5 +38,7 @@ export const useThemeStore = defineStore('theme', () => {
return {
currentTheme,
setTheme,
initializeTheme,
applyThemeToDOM,
};
});