jupyter 监听底层传来的消息进行绑定

chromesetting
杨树林 5 years ago
parent 6bbce2ca8e
commit 5919d65056

@ -72,6 +72,7 @@ class Challengesjupyter extends Component {
}
componentDidMount() {
var that=this;
setTimeout(this.ChallengesList(), 1000);
let id = this.props.match.params.shixunId;
let ChallengesURL = `/jupyters/get_info_with_tpm.json`;
@ -115,6 +116,14 @@ class Challengesjupyter extends Component {
}, 600)
});
window.addEventListener('jupytermessage', (e) => {
console.log("触发了jupytermessage");
console.log("触发了jupytermessage");
that.modifyjupyter();
});
}
updatamakedowns = () => {
@ -184,6 +193,7 @@ class Challengesjupyter extends Component {
.then((result) => {
if (result.data.status === 0) {
this.props.showNotification(`应用成功`);
console.log("触发了jupytermessage调用了应用成功");
}
}).catch((error) => {
})
@ -328,7 +338,7 @@ class Challengesjupyter extends Component {
marginLeft: '30px',
}} onClick={()=>this.onclki(true)}></i>
}
<div className="challenbaocun" onClick={() => this.modifyjupyter(this.state)}><p
<div className="challenbaocun" ><p
className="challenbaocuntest">导入</p>
</div>
</div>

Loading…
Cancel
Save