fix(系统设置): 更换系统LOGO后不生效

--bug=1019047 --user=李玉号 【系统设置】github #18879,更换系统
LOGO后,非更换logo人访问还是原favicon/无痕窗口访问还是原favicon【首次更换必现】
https://www.tapd.cn/55049933/s/1283842

Closes #18879
This commit is contained in:
shiziyuan9527 2022-10-31 17:07:49 +08:00 committed by lyh
parent 67f0e41a93
commit d849008131
1 changed files with 10 additions and 0 deletions

View File

@ -122,9 +122,19 @@ export default {
if (title) {
document.title = title;
}
if (response.data[0].paramValue) {
this.shortcutIcon();
}
this.setAsideTheme(theme);
});
},
shortcutIcon() {
let link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = '/display/file/logo';
document.getElementsByTagName('head')[0].appendChild(link);
},
setAsideTheme(theme) {
switch (this.sideTheme) {
case "theme-light":