From a75b47c218c9dbddb13ac540f50abbe041aa9760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=8F?= <1978476055@qq.com> Date: Fri, 20 Dec 2024 09:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E4=B8=8B=E8=BD=BD=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/exportFile/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/system/exportFile/index.vue b/src/views/system/exportFile/index.vue index 050fcf2..985b655 100644 --- a/src/views/system/exportFile/index.vue +++ b/src/views/system/exportFile/index.vue @@ -127,7 +127,13 @@ export default { }, // 下载 downLoad(path) { - window.open(path) + // window.open(path) + const fileUrl = path; // 替换为实际的文件 URL + const link = document.createElement('a'); + link.href = fileUrl; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); }, pageChange(page) { this.tableFrom.page = page;