data() {
return {
isShowFullScreen: true, // 全屏or退出全屏标志
doc: document.documentElement
}
},
keyUp(element) {
this.isShowFullScreen = !this.isShowFullScreen
if (element.requestFullscreen) {
element.requestFullscreen()
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen()
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen()
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen()
}
}
实现全屏操作
最新推荐文章于 2024-04-28 08:02:36 发布