From 3501165a3a31bacdc868fc9ed25caaa998c45217 Mon Sep 17 00:00:00 2001 From: liuye Date: Tue, 20 Jun 2023 16:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/packages/basic/AiFileList.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/packages/basic/AiFileList.vue b/ui/packages/basic/AiFileList.vue index 49de9f2b..f3f887ca 100644 --- a/ui/packages/basic/AiFileList.vue +++ b/ui/packages/basic/AiFileList.vue @@ -47,7 +47,13 @@ export default { methods: { downFile(item) { if (this.clickDownload) { - this.$download(item.url, item.name) + const link = document.createElement('a') + link.style.display = 'none' + link.href = item.url + link.setAttribute('download', item.name) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) } else window.open(`${item.url}`) } }