From e8ff20d94cb59930d9958e390c3edb2ac93314c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 6 Jul 2019 13:58:15 +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 91d4738d5..6a1e16d6d 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -31,7 +31,8 @@ class Fileslistitem extends Component{ downloadfiles=(url,name)=>{ const aLink = document.createElement('a'); aLink.style.display='none'; - aLink.download =name; + console.log(name) + aLink.setAttribute('download',name) aLink.href = url; document.body.appendChild(aLink); aLink.click();