Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qinlili23333/sakiprogress
简单无依赖的网页悬浮进度条,名字的灵感来自老大哥@早见咲Saki
https://github.com/qinlili23333/sakiprogress
Last synced: 20 days ago
JSON representation
简单无依赖的网页悬浮进度条,名字的灵感来自老大哥@早见咲Saki
- Host: GitHub
- URL: https://github.com/qinlili23333/sakiprogress
- Owner: qinlili23333
- License: apache-2.0
- Created: 2021-08-13T07:53:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-17T03:02:52.000Z (over 3 years ago)
- Last Synced: 2024-11-09T18:28:03.091Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SakiProgress
简单无依赖的网页悬浮进度条,名字的灵感来自老大哥@早见咲Saki
[![](https://data.jsdelivr.com/v1/package/gh/qinlili23333/SakiProgress/badge)](https://www.jsdelivr.com/package/gh/qinlili23333/SakiProgress)## 接口说明
#### init(?颜色)`1.0.0`
初始化进度条,调用其他接口前必须先调用该接口
颜色是可选参数,用于进度条颜色
#### destroy()`1.0.1`
销毁进度条,可在body内容大幅更改前调用,等之后重新初始化
#### setPercent(百分比)`1.0.0`
设置进度条百分比,传入纯数字,不需要带百分号
#### clearProgress()`1.0.0`
清空进度条到0%
#### hideDiv()`1.0.0`
隐藏进度条
#### showDiv()`1.0.0`
显示进度条
#### setText(文本)`1.0.0`
设置进度条显示的文本
#### setTextAlert(文本)`1.0.3`
相比setText优先级更高,三秒内不会被普通优先级内容覆盖,且可以延迟三秒隐藏进度条
#### addBtn(按钮图片)`1.0.2`
在右侧添加一个按钮,按钮对象会返回
#### removeBtn(按钮对象)`1.0.2`
移除传入的按钮