mirror of https://github.com/1Panel-dev/1Panel
feat: 文件下载页面增加 loading
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…
Reference in New Issue