// 全屏
fullScreen() {
const document = (window as any).document;
if (this.isFull) {
// 退出
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
} else {
const element = document.getElementById(‘subapp-pcp----’) || document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
}
this.isFull = !this.isFull;
}
}
设置全屏/退出全屏
最新推荐文章于 2024-06-24 12:45:00 发布
关键词由CSDN通过智能技术生成