dev_forum
杨树明 6 years ago
parent 7d8d1e6ecf
commit 5690f0b21f

@ -56,7 +56,15 @@ class Fileslistitem extends Component{
},
}).then((result)=>{
if(result.data.attachment_histories.length===0){
this.downloadfiles(result.data.url)
let link = document.createElement('a');
document.body.appendChild(link);
link.href = result.data.url;
link.download = result.data.title;
//兼容火狐浏览器
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}else{
this.setState({
Showoldfiles:true,

Loading…
Cancel
Save