feat: 文件下载页面增加 loading

pull/214/head
zhengkunwang223 2 years ago committed by zhengkunwang223
parent 0fe1fd3c7b
commit fb5c3429e5

@ -76,7 +76,7 @@ export const MoveFile = (params: File.FileMove) => {
};
export const DownloadFile = (params: File.FileDownload) => {
return http.download<BlobPart>('files/download', params, { responseType: 'blob' });
return http.download<BlobPart>('files/download', params, { responseType: 'blob', timeout: 20000 });
};
export const ComputeDirSize = (params: File.DirSizeReq) => {

@ -454,6 +454,7 @@ const openDownload = () => {
fileDownload.name = selects.value.length > 1 ? getRandomStr(6) : selects.value[0].name;
downloadRef.value.acceptParams(fileDownload);
} else {
loading.value = true;
fileDownload.name = selects.value[0].name;
DownloadFile(fileDownload as File.FileDownload)
.then((res) => {

Loading…
Cancel
Save