fix: 解决主题色切换报错的问题 (#5287)

This commit is contained in:
ssongliu 2024-06-05 10:29:08 +08:00 committed by GitHub
parent 7fb41f43cc
commit 296ae1c2e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View file

@ -68,7 +68,7 @@ class RequestHttp {
return;
}
if (data.code == ResultEnum.EXPIRED) {
globalStore.errStatus = 'err-entrance';
router.push({ name: 'Expired' });
return;
}
if (data.code == ResultEnum.ERRXPACK) {

View file

@ -357,12 +357,14 @@ const onSave = async (key: string, val: any) => {
globalStore.themeConfig.theme = val;
}
switchTheme();
updateXpackSettingByKey('Theme', val === 'dark-gold' ? 'dark-gold' : '');
if (val === 'dark-gold') {
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
loading.value = false;
search();
return;
if (globalStore.isProductPro) {
updateXpackSettingByKey('Theme', val === 'dark-gold' ? 'dark-gold' : '');
if (val === 'dark-gold') {
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
loading.value = false;
search();
return;
}
}
}
if (key === 'MenuTabs') {

View file

@ -106,7 +106,7 @@ interface DialogProps {
passwdKeep: string;
}
const acceptParams = (params: DialogProps): void => {
form.proxyUrl = params.url;
form.proxyUrl = params.url || '127.0.0.1';
form.proxyType = params.type;
form.proxyPortItem = params.port ? Number(params.port) : 7890;
form.proxyUser = params.user;