jy-fullpage
v1.0.0
Published
```shell npm i jy-fullpage --save ```
Downloads
3
Readme
安装
npm i jy-fullpage --save
引入方式
import { fullScreen, exitFullScreen, isFullScreen } from 'jy-fullpage'
功能说明
fullScreen:进入全屏
exitFullScreen:退出全屏
isFullScreen:判断当前是否处于全屏的状态
使用示例
import { fullScreen, exitFullScreen, isFullScreen } from 'jy-fullpage'
// 进入全屏
function enterFullScreen() {
// 需要全屏的元素
const element = this.$refs.fullScreenRef
fullScreen(element)
}
// 退出全屏
function exitFullScreenHandle() {
const isFullScreenTag = isFullScreen()
if (isFullScreenTag) {
exitFullScreen()
}
}