🔨 优化异常处理逻辑.
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -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:
|
||||
|
||||
@@ -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 = {};
|
||||
}
|
||||
}
|
||||
// 设置缓存
|
||||
|
||||
@@ -23,7 +23,6 @@ export default function useFavorite(type: FavoriteType) {
|
||||
await addFavorite(request);
|
||||
record.favorite = true;
|
||||
}
|
||||
} catch (e) {
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
@@ -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 = {};
|
||||
}
|
||||
}
|
||||
// 设置缓存
|
||||
|
||||
@@ -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 = {}
|
||||
}
|
||||
}
|
||||
// 设置缓存
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ export default defineStore('tips', {
|
||||
await setTipsTipped(key);
|
||||
this.tippedKeys.push(key);
|
||||
} catch (e) {
|
||||
console.error('set tipped error', e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -113,6 +113,7 @@ export default defineStore('user', {
|
||||
try {
|
||||
await userLogout();
|
||||
} catch (e) {
|
||||
console.error('logout error', e);
|
||||
} finally {
|
||||
// 登出回调
|
||||
this.logoutCallBack();
|
||||
|
||||
Reference in New Issue
Block a user