使用插件 screenfull
npm install screenfull
import screenfull from 'screenfull'
const fullScreen = () => {
if(isShow.value) {
//打开全屏
screenfull.request()
} else {
关闭全屏
screenfull.exit()
}
isShow.value = !isShow.value;
}
使用插件 screenfull
npm install screenfull
import screenfull from 'screenfull'
const fullScreen = () => {
if(isShow.value) {
//打开全屏
screenfull.request()
} else {
关闭全屏
screenfull.exit()
}
isShow.value = !isShow.value;
}