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:
parent
67f0e41a93
commit
d849008131
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue