🔨 优化异常处理逻辑.
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
|
required: true
|
||||||
- label: 我已搜索 [issue](https://github.com/dromara/orion-visor/issues) 并没有找到相关问题
|
- label: 我已搜索 [issue](https://github.com/dromara/orion-visor/issues) 并没有找到相关问题
|
||||||
required: true
|
required: true
|
||||||
|
- label: 我已 star 了此项目, 否则可能会被自动关闭
|
||||||
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export const useCardFieldConfig = (table: string, originFieldConfig: CardFieldCo
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 解析配置
|
// 解析配置
|
||||||
@@ -92,6 +93,7 @@ export const useCardFieldConfig = (table: string, originFieldConfig: CardFieldCo
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置缓存
|
// 设置缓存
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ export default function useFavorite(type: FavoriteType) {
|
|||||||
await addFavorite(request);
|
await addFavorite(request);
|
||||||
record.favorite = true;
|
record.favorite = true;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export const useQueryOrder = (table: string, defaultSort: number = ASC): QueryOr
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 解析配置
|
// 解析配置
|
||||||
@@ -57,6 +58,7 @@ export const useQueryOrder = (table: string, defaultSort: number = ASC): QueryOr
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置缓存
|
// 设置缓存
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export const useTableColumns = (table: string, originColumns: Array<TableColumnD
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 解析配置
|
// 解析配置
|
||||||
@@ -100,6 +101,7 @@ export const useTableColumns = (table: string, originColumns: Array<TableColumnD
|
|||||||
try {
|
try {
|
||||||
preferConfig = JSON.parse(localConfig as string);
|
preferConfig = JSON.parse(localConfig as string);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
preferConfig = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置缓存
|
// 设置缓存
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default defineStore('dict', {
|
|||||||
const { data } = await getDictValueList(unloadKeys);
|
const { data } = await getDictValueList(unloadKeys);
|
||||||
this.$patch(data as object);
|
this.$patch(data as object);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
console.error('load dict error', e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default defineStore('tips', {
|
|||||||
await setTipsTipped(key);
|
await setTipsTipped(key);
|
||||||
this.tippedKeys.push(key);
|
this.tippedKeys.push(key);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.error('set tipped error', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ export default defineStore('user', {
|
|||||||
try {
|
try {
|
||||||
await userLogout();
|
await userLogout();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.error('logout error', e);
|
||||||
} finally {
|
} finally {
|
||||||
// 登出回调
|
// 登出回调
|
||||||
this.logoutCallBack();
|
this.logoutCallBack();
|
||||||
|
|||||||
Reference in New Issue
Block a user