新增错误消息防抖机制,优化错误提示显示并清理冗余代码

This commit is contained in:
WUSIJIAN
2026-01-05 10:05:25 +08:00
parent c5c1c32193
commit 3ee3c90462
14 changed files with 49 additions and 38 deletions

View File

@@ -74,7 +74,7 @@ const handleExport = async () => {
isShowDialog.value = false;
} catch (error: any) {
console.error('导出失败:', error);
ElMessage.error(`导出失败:${error.message || '未知错误'}`);
// 错误已由请求拦截器统一处理
} finally {
loading.value = false;
}

View File

@@ -201,7 +201,7 @@ const dataList = async () => {
tableData.total = res.data.total;
} catch (error) {
console.error('获取数据失败:', error);
ElMessage.error('获取数据失败');
// 错误已由请求拦截器统一处理
} finally {
tableData.loading = false;
}