在管理后台页面右上角有个快捷进入 全屏展示和退出全屏展示的功能,
具体实现如下:
代码语言:javascript复制<el-button
size="small"
icon="FullScreen"
circle
@click="fullScreen">
</el-button>
const fullScreen = () => {
//获取当前是否全屏展示
let full = document.fullscreenElement
if (!full) {
document.documentElement.requestFullscreen()
} else {
document.exitFullscreen()
}
}