调整jupyte

chromesetting
杨树林 5 years ago
parent 5600969a81
commit 2c97a97483

@ -30,3 +30,23 @@ function keyDown(e){
}
}
document.onkeydown = keyDown;
$(function(){
window.addEventListener('message', (e) => {
console.log("触发了Parentwindow");
console.log(e);
if(e){
if(e.data){
if(e.data==="Parentwindow"){
console.log("父窗口调我了");
}
}
}
});
})

@ -243,6 +243,15 @@ class Challengesjupyter extends Component {
enlarge:bool
})
}
daoruzhon=()=>{
var _iframe = document.getElementById("frame");
if(_iframe == null || _iframe == undefined || _iframe == ""){
console.log("framenull");
return;
}
console.log("framego");
_iframe.contentWindow.postMessage("Parentwindow", "*");
}
render() {
let{ChallengesDataList,booljupyterurls,enlarge}=this.state;
@ -404,9 +413,9 @@ class Challengesjupyter extends Component {
marginLeft: '30px',
}} onClick={()=>this.onclki(true)}></i>
}
{/*<div className="challenbaocun" ><p*/}
{/* className="challenbaocuntest">导入</p>*/}
{/*</div>*/}
<div className="challenbaocun" ><p
className="challenbaocuntest" onClick={()=>this.daoruzhon()}>导入</p>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save