mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
退出全屏 esc 触发监听
This commit is contained in:
@@ -388,8 +388,12 @@ export default {
|
||||
window.addEventListener("fullscreenchange", () => {
|
||||
this.isFullscreen = this.isFullScreen();
|
||||
});
|
||||
window.addEventListener("esc", () => {
|
||||
this.toggleFullScreen();
|
||||
window.addEventListener("keydown", (e) => {
|
||||
console.log("是否监听到");
|
||||
if(e.keyCode == 27){
|
||||
console.log("是否监听到 esc");
|
||||
this.toggleFullScreen();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user