🔨 优化异常处理逻辑.

This commit is contained in:
lijiahangmax
2025-11-28 10:27:02 +08:00
parent 61fa7a6e32
commit 0ece84bdf1
8 changed files with 11 additions and 2 deletions

View File

@@ -17,6 +17,8 @@ body:
required: true
- label: 我已搜索 [issue](https://github.com/dromara/orion-visor/issues) 并没有找到相关问题
required: true
- label: 我已 star 了此项目, 否则可能会被自动关闭
required: true
- type: input
id: version
attributes:

View File

@@ -70,6 +70,7 @@ export const useCardFieldConfig = (table: string, originFieldConfig: CardFieldCo
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {};
}
}
// 解析配置
@@ -92,6 +93,7 @@ export const useCardFieldConfig = (table: string, originFieldConfig: CardFieldCo
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {};
}
}
// 设置缓存

View File

@@ -23,7 +23,6 @@ export default function useFavorite(type: FavoriteType) {
await addFavorite(request);
record.favorite = true;
}
} catch (e) {
} finally {
loading.value = false;
}

View File

@@ -33,6 +33,7 @@ export const useQueryOrder = (table: string, defaultSort: number = ASC): QueryOr
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {};
}
}
// 解析配置
@@ -57,6 +58,7 @@ export const useQueryOrder = (table: string, defaultSort: number = ASC): QueryOr
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {};
}
}
// 设置缓存

View File

@@ -78,6 +78,7 @@ export const useTableColumns = (table: string, originColumns: Array<TableColumnD
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {}
}
}
// 解析配置
@@ -100,6 +101,7 @@ export const useTableColumns = (table: string, originColumns: Array<TableColumnD
try {
preferConfig = JSON.parse(localConfig as string);
} catch (e) {
preferConfig = {}
}
}
// 设置缓存

View File

@@ -42,7 +42,7 @@ export default defineStore('dict', {
const { data } = await getDictValueList(unloadKeys);
this.$patch(data as object);
} catch (e) {
} finally {
console.error('load dict error', e);
}
},

View File

@@ -22,6 +22,7 @@ export default defineStore('tips', {
await setTipsTipped(key);
this.tippedKeys.push(key);
} catch (e) {
console.error('set tipped error', e);
}
}
},

View File

@@ -113,6 +113,7 @@ export default defineStore('user', {
try {
await userLogout();
} catch (e) {
console.error('logout error', e);
} finally {
// 登出回调
this.logoutCallBack();