From 88ff69673039f2f9fbd056e78442484e2abe3c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 3 Jul 2019 13:49:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Resource/Fileslistitem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 2ac15a542..e69cdb4d5 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -40,8 +40,9 @@ class Fileslistitem extends Component{ let link = document.createElement('a'); // link.href = window.URL.createObjectURL(new Blob([result.data.url])); link.href = result.data.url; + let filesname=encodeURIComponent(result.data.title) console.log(result.data.title) - link.download = encodeURIComponent(result.data.title); + link.download = decodeURIComponent(filesname) //兼容火狐浏览器 console.log(result.data.title) document.body.appendChild(link);