src/plugins/download.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/plugins/download.ts
@@ -34,6 +34,8 @@ }, async zip(url: string, name: string) { url = baseURL + url; downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); try { const res = await axios({ method: 'get', url: url, @@ -50,6 +52,12 @@ } else { this.printErrMsg(res.data); } downloadLoadingInstance.close(); } catch (r) { console.error(r) ElMessage.error('下载文件出现错误,请联系管理员!') downloadLoadingInstance.close(); } }, async printErrMsg(data: any) { const resText = await data.text();