兵马未动 粮草先行
This commit is contained in:
@@ -156,8 +156,10 @@ export function useTable(options?: BasicTableProps) {
|
||||
if (state.onLoaded) await state.onLoaded(state);
|
||||
if (state.onCascaded) await state.onCascaded(state);
|
||||
} catch (err: any) {
|
||||
// 捕获异常并显示错误提示
|
||||
ElMessage.error(err.msg || err.data.msg);
|
||||
// 全局拦截器已展示过错误时不再重复弹窗
|
||||
if (!err?._messageShown) {
|
||||
ElMessage.error(err?.msg || err?.data?.msg || '请求失败');
|
||||
}
|
||||
} finally {
|
||||
// 结束加载数据,设置state.loading为false
|
||||
state.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user