TJ-JSTOOLS ---- 浏览器工具函数
安装
sh
npm i tj-jstools
1
简单使用
js
import { isFull } from "tj-jstools";
console.log(isFull)
console.log(isFull()) // false
1
2
3
2
3
API-列表
| 序号 | 名称 | 参数 | 功能简介 |
|---|---|---|---|
| 1 | isFull | none | 判断当前是否全屏 |
| 2 | getFullEl | none | 获取全屏元素 |
| 3 | isFullEnabled | none | 判断当前是否支持全屏功能 |
| 4 | openFull | el?: Element,options?: FullscreenOptions | 打开全屏 |
| 5 | closeFull | none | 关闭全屏 |
| 6 | toggleFull | el?: Element,options?: FullscreenOptions | 打开或者关闭全屏 |
| 7 | scrollBackTop | step?: number,time?: number | 返回浏览器顶部 |
| 8 | scrollProgressBar | none | 计算当前页面已读内容的百分比占比 |
TIP
点击API名称,可以直接进入对应API详情页面!
TJ-JSTOOLS