mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
退出全屏 esc 触发监听1
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user