vue中监听退出全屏事件时,按第一下esc键不执行我的事件只退出全屏,按第二下才执行quit(){let_this=this;document.onkeyup=function(e){letkey=window.event.keyCode;if(key===27){console.log('退出全屏')}};}
quit(){let_this=this;document.onkeyup=function(e){letkey=window.event.keyCode;if(key===27){console.log('退出全屏')}};}
let_this=this;document.onkeyup=function(e){letkey=window.event.keyCode;if(key===27){console.log('退出全屏')}};}
document.onkeyup=function(e){letkey=window.event.keyCode;if(key===27){console.log('退出全屏')}};}
letkey=window.event.keyCode;if(key===27){console.log('退出全屏')}};}
if(key===27){console.log('退出全屏')}};}
console.log('退出全屏')}};}
};}
}
Kled
慕姐4208626
相关分类