From 027dab3f9ba4fbf02c8c8dd076036b9664e7a765 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 10:41:05 +0800 Subject: [PATCH] b --- .../react/src/modules/courses/Resource/Fileslistitem.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 0b65a6f9f..4ab29ab3f 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -44,20 +44,16 @@ class Fileslistitem extends Component{ document.body.appendChild(link); link.href = result.data.url; console.log(newvalue) - link.download = Base64.decode(newvalue); + // link.download = Base64.decode(newvalue); //兼容火狐浏览器 // let evt = document.createEvent("MouseEvents"); // evt.initEvent("click", false, false); // link.dispatchEvent(evt); // document.body.removeChild(link); - - link.style.display = 'none'; - + link.style.display = 'none'; link.setAttribute('download',result.data.title); document.body.appendChild(link); link.click(); - - // // window.location.href=result.data.url; // let url = window.URL.createObjectURL(new Blob([result.data.url])); // let link = document.createElement('a');