dev_forum
杨树明 5 years ago
parent f423e21561
commit 6a75a6c56a

@ -43,10 +43,10 @@ class Fileslistitem extends Component{
}).then((result)=>{ }).then((result)=>{
if(result.data.attachment_histories.length===0){ if(result.data.attachment_histories.length===0){
link.href = result.data.url; // link.href = result.data.url;
link.style.display = 'none'; // link.style.display = 'none';
document.body.appendChild(link); // document.body.appendChild(link);
link.click(); // link.click();
//兼容火狐浏览器 //兼容火狐浏览器
// let evt = document.createEvent("MouseEvents"); // let evt = document.createEvent("MouseEvents");
// evt.initEvent("click", false, false); // evt.initEvent("click", false, false);
@ -60,7 +60,7 @@ class Fileslistitem extends Component{
// link.setAttribute('download',result.data.title); // link.setAttribute('download',result.data.title);
// document.body.appendChild(link); // document.body.appendChild(link);
// link.click(); // link.click();
window.open=result.data.url;
}else{ }else{
this.setState({ this.setState({
Showoldfiles:true, Showoldfiles:true,

Loading…
Cancel
Save