From e6becb93379d53c377579d68293c14c36b1f95f8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 28 Jul 2021 13:13:28 +0800 Subject: [PATCH] =?UTF-8?q?BLOB=E4=B8=8B=E8=BD=BD=E6=97=B6=E6=B8=85?= =?UTF-8?q?=E9=99=A4URL=E5=AF=B9=E8=B1=A1=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/zipdownload.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-ui/src/utils/zipdownload.js b/ruoyi-ui/src/utils/zipdownload.js index ac2745b..8a1b819 100644 --- a/ruoyi-ui/src/utils/zipdownload.js +++ b/ruoyi-ui/src/utils/zipdownload.js @@ -32,9 +32,11 @@ export function resolveBlob(res, mimeType) { var result = patt.exec(contentDisposition) var fileName = result[1] fileName = fileName.replace(/\"/g, '') + aLink.style.display = 'none' aLink.href = URL.createObjectURL(blob) aLink.setAttribute('download', fileName) // 设置下载文件名称 document.body.appendChild(aLink) aLink.click() + URL.revokeObjectURL(aLink.href);//清除引用 document.body.removeChild(aLink); }