dev_forum
杨树明 5 years ago
parent 5bf570bf33
commit 4b8e07cfe2

@ -40,8 +40,10 @@ class Fileslistitem extends Component{
let link = document.createElement('a'); let link = document.createElement('a');
// link.href = window.URL.createObjectURL(new Blob([result.data.url])); // link.href = window.URL.createObjectURL(new Blob([result.data.url]));
link.href = result.data.url; link.href = result.data.url;
// link.download = encodeURI(result.data.title); console.log(result.data.title)
link.download = result.data.title;
//兼容火狐浏览器 //兼容火狐浏览器
console.log(result.data.title)
document.body.appendChild(link); document.body.appendChild(link);
let evt = document.createEvent("MouseEvents"); let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false); evt.initEvent("click", false, false);

@ -687,9 +687,9 @@ class Fileslists extends Component{
<div className="studentList_operation_ul"> <div className="studentList_operation_ul">
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>:""} {this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>:""}
{this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onSend}>发送</a></li>:""} {this.props.isAdmin()?<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onSend}>发送</a></li>:""}
{this.props.isAdmin()? {/*{this.props.isAdmin()?*/}
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onOpen}>立即发布</a></li> {/*<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>立即发布</a></li>*/}
:""} {/*:""}*/}
{this.props.isAdmin()?course_is_public===true? {this.props.isAdmin()?course_is_public===true?
<li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onOpen}>设为公开</a></li> <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onOpen}>设为公开</a></li>
:"":""} :"":""}

Loading…
Cancel
Save