feat 页面标题和页面的favicon.ico动态修复
This commit is contained in:
@@ -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
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user