dev_forum
杨树明 5 years ago
parent 2d0a22153f
commit 7b693c49c2

@ -46,10 +46,16 @@ class Fileslistitem extends Component{
console.log(newvalue)
link.download = Base64.decode(newvalue);
//兼容火狐浏览器
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
// let evt = document.createEvent("MouseEvents");
// evt.initEvent("click", false, false);
// link.dispatchEvent(evt);
// document.body.removeChild(link);
link.style.display = 'none';
link.setAttribute('download',result.data.title);
document.body.appendChild(link);
link.click();
// // window.location.href=result.data.url;

Loading…
Cancel
Save