1、补充下载异常处理

2、字典枚举
This commit is contained in:
xiaocp2009 2025-10-29 11:23:15 +08:00
parent f10819bee8
commit ef2a36274d
2 changed files with 6 additions and 1 deletions

View File

@ -4,5 +4,6 @@ export enum SetupStoreId {
Auth = 'auth-store',
Route = 'route-store',
Tab = 'tab-store',
Notice = 'notice-store'
Notice = 'notice-store',
Dict = 'dict-store'
}

View File

@ -116,6 +116,10 @@ export function useDownload() {
const response = await fetch(fullUrl, requestOptions);
if (response.status !== 200) {
throw new Error(errorCodeRecord.default);
}
await handleResponse(response);
const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`;