refactor: 删除保存系统参数后对icon的操作
This commit is contained in:
parent
d401340b84
commit
eed243d40c
|
@ -151,19 +151,11 @@ export default {
|
|||
} else {
|
||||
localStorage.setItem("default-document-title", "MeterSphere");
|
||||
}
|
||||
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":
|
||||
|
|
|
@ -178,9 +178,6 @@ export default {
|
|||
if (title) {
|
||||
document.title = title;
|
||||
}
|
||||
if (response.data[0].paramValue) {
|
||||
this.shortcutIcon();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -304,13 +301,6 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
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);
|
||||
},
|
||||
redirectAuth(authId) {
|
||||
if (authId === 'LDAP' || authId === 'LOCAL') {
|
||||
return;
|
||||
|
|
|
@ -249,9 +249,6 @@ export default {
|
|||
if (this.formInline.sideTheme) {
|
||||
localStorage.setItem("sideTheme", this.formInline.sideTheme);
|
||||
}
|
||||
if (this.formInline.logo) {
|
||||
this.shortcutIcon();
|
||||
}
|
||||
this.setAsideTheme();
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
window.location.reload();
|
||||
|
@ -370,20 +367,10 @@ export default {
|
|||
this.formInline.css = response.data[8].paramValue;
|
||||
this.cssList.push({name: response.data[8].fileName, db: true});
|
||||
}
|
||||
if (response.data[0].paramValue) {
|
||||
this.shortcutIcon();
|
||||
}
|
||||
this.setAsideTheme();
|
||||
|
||||
})
|
||||
},
|
||||
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);
|
||||
},
|
||||
cancel() {
|
||||
this.showEdit = true;
|
||||
this.showCancel = false;
|
||||
|
|
Loading…
Reference in New Issue