为特征词下载功能添加了错误处理和自动重试逻辑。当请求失败时,控制台会记录错误信息,并自动触发重新查询,以提高用户体验和功能的健壮性。
@@ -119,9 +119,11 @@ async function handleRefresh(row: any) {
};
try {
const { code, msg } = await useElTableData(api.wordDownload, query, tableData, total, loading);
- if (code === 2000) ElMessage.success({ message: msg, plain: true})
+ if (code === 2000) ElMessage.success({ message: msg, plain: true })
} catch(error) {
console.log('Error==>', error);
+ } finally {
+ await handleQuery();
}
</script>