fix(web): improve request cancellation and dataset upload handling

- Skip error notification for cancelled requests in interceptor
- Update progress completion condition from exact match to greater than or equal
- Fix progress bar condition to include zero value in range check
- Add gradient color to progress bar stroke for better visual feedback
- Remove AbortController from tracking after successful file upload
- Return true immediately after cancelling upload to allow file removal
- Add explicit return statement after successful server file deletion
- Improve file removal logic to handle cancelled and failed uploads consistently
This commit is contained in:
yujiangping
2026-01-22 20:11:04 +08:00
parent ac160b6b41
commit 5dcc815240
2 changed files with 19 additions and 5 deletions

View File

@@ -122,6 +122,11 @@ service.interceptors.response.use(
}
},
(error) => {
// 如果是取消请求,不显示错误提示
if (axios.isCancel(error) || error.name === 'AbortError' || error.code === 'ERR_CANCELED') {
return Promise.reject(error);
}
// 处理网络错误、超时等
let msg = error.response?.data?.error || error.response?.error;
const status = error?.response ? error.response.status : error;