style(系统设置): 样式调整,给默认开源版设置系统主题
This commit is contained in:
parent
862f6ca5f6
commit
0eebb5289a
|
@ -86,6 +86,7 @@ export default {
|
||||||
this.initSessionTimer();
|
this.initSessionTimer();
|
||||||
if (!hasLicense()) {
|
if (!hasLicense()) {
|
||||||
setDefaultTheme();
|
setDefaultTheme();
|
||||||
|
setCustomizeColor();
|
||||||
this.color = ORIGIN_COLOR;
|
this.color = ORIGIN_COLOR;
|
||||||
} else {
|
} else {
|
||||||
this.$get('/system/theme', res => {
|
this.$get('/system/theme', res => {
|
||||||
|
@ -93,7 +94,7 @@ export default {
|
||||||
setColor(this.color, this.color, this.color, this.color, this.color);
|
setColor(this.color, this.color, this.color, this.color, this.color);
|
||||||
this.$store.commit('setTheme', res.data);
|
this.$store.commit('setTheme', res.data);
|
||||||
});
|
});
|
||||||
this.query();
|
this.getDisplayInfo();
|
||||||
}
|
}
|
||||||
// OIDC redirect 之后不跳转
|
// OIDC redirect 之后不跳转
|
||||||
if (window.location.href.endsWith('#/refresh')) {
|
if (window.location.href.endsWith('#/refresh')) {
|
||||||
|
@ -147,25 +148,29 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
query() {
|
getDisplayInfo() {
|
||||||
this.result = this.$get("/display/info", response => {
|
this.result = this.$get("/display/info", response => {
|
||||||
let theme = "";
|
let theme = "";
|
||||||
if (response.data && response.data[5] && response.data[5].paramValue) {
|
if (response.data && response.data[5] && response.data[5].paramValue) {
|
||||||
theme = response.data[5].paramValue;
|
theme = response.data[5].paramValue;
|
||||||
}
|
}
|
||||||
if (response.data && response.data[7] && response.data[7].paramValue) {
|
if (response.data && response.data[7] && response.data[7].paramValue) {
|
||||||
this.setAsideTheme(response.data[7].paramValue, theme);
|
this.sideTheme = response.data[7].paramValue;
|
||||||
}
|
}
|
||||||
|
this.setAsideTheme(theme);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setAsideTheme(sideTheme, theme) {
|
setAsideTheme(theme) {
|
||||||
this.sideTheme = sideTheme;
|
switch (this.sideTheme) {
|
||||||
if (sideTheme === "theme-light") {
|
case "theme-light":
|
||||||
setLightColor();
|
setLightColor();
|
||||||
} else if (sideTheme === "theme-default") {
|
break;
|
||||||
|
case "theme-default":
|
||||||
setAsideColor();
|
setAsideColor();
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
setCustomizeColor(theme);
|
setCustomizeColor(theme);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fixedChange(isFixed) {
|
fixedChange(isFixed) {
|
||||||
|
|
Loading…
Reference in New Issue