实现全屏操作
作者:互联网
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()
}
}
标签:实现,msRequestFullscreen,else,isShowFullScreen,全屏,操作,mozRequestFullScreen,element 来源: https://blog.csdn.net/lizhi1030/article/details/89969339