feat 页面标题和页面的favicon.ico动态修复

This commit is contained in:
Ironsp
2026-07-07 09:23:30 +08:00
parent 88186b8dfc
commit 93a5feabdc
5 changed files with 48 additions and 23 deletions

View File

@@ -19,6 +19,8 @@ export const useSettingsStore = defineStore('setting', () => {
radiusBase: defaultSettings.radiusBase
});
const title = ref<string>(defaultSettings.title);
const appTitle = ref<string>(defaultSettings.title);
const appLogoUrl = ref<string>('');
const theme = ref<string>(storageSetting.value.theme);
const sideTheme = ref<string>(storageSetting.value.sideTheme);
const showSettings = ref<boolean>(defaultSettings.showSettings);
@@ -36,8 +38,17 @@ export const useSettingsStore = defineStore('setting', () => {
title.value = value;
useDynamicTitle();
};
const setSystemInfo = (name: string, url: string) => {
appTitle.value = name || defaultSettings.title;
appLogoUrl.value = url || '';
useDynamicTitle();
};
return {
title,
appTitle,
appLogoUrl,
theme,
sideTheme,
showSettings,
@@ -50,6 +61,7 @@ export const useSettingsStore = defineStore('setting', () => {
dark,
navType,
radiusBase,
setTitle
setTitle,
setSystemInfo
};
});