退出全屏 esc 触发监听1

This commit is contained in:
joshen
2025-03-10 13:17:13 +08:00
parent 01a1b2c7a9
commit 0f1c8081cb

View File

@@ -388,12 +388,8 @@ export default {
window.addEventListener("F", () => { window.addEventListener("F", () => {
this.isFullscreen = this.isFullScreen(); this.isFullscreen = this.isFullScreen();
}); });
window.addEventListener("keydown", (e) => { window.addEventListener("ESC", () => {
console.log("是否监听到"); this.toggleFullScreen();
if(e.keyCode == 27){
console.log("是否监听到 esc");
this.toggleFullScreen();
}
}); });
}, },
methods: { methods: {