Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-he95/numswheel
https://github.com/simon-he95/numswheel
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/simon-he95/numswheel
- Owner: Simon-He95
- Created: 2022-07-27T01:41:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:53:23.000Z (11 months ago)
- Last Synced: 2024-09-19T01:57:20.429Z (about 2 months ago)
- Language: TypeScript
- Size: 76.2 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
English | 简体中文
## 此文是[simon-js-tool](https://www.npmjs.com/package/simon-js-tool)额外的numsWheel文档
## 更多
- 导出函数 [exports-function](https://github.com/SimonHe1995/exportsFunction)
- threejs [@simon_he/s-three](https://github.com/Simon-He95/sThree)
- Echarts [@simon_he/s-chart](https://github.com/Simon-He95/sCharts)## numsWheel
- 数字滚轮控件
- 无需在onMounted中调用,可以在任意地方调用
- 基于odometer封装, 更简单的在业务中使用
- 参数:
- container: string | HTMLElement 父容器
- options: { format: '(,ddd)' | '(,ddd).dd' | '(.ddd),dd' | '( ddd),dd' | 'd' 数字格式 startVal: number 起始数字 endVal: number 最终数字 duration: number 动画时长 animation: 'count' | 'countdown' 动画方式 }
```javascript
numWheel('#main', { endVal: 9000.12 }) // 默认format: '(,ddd).dd' startVal: 0 duration: 500 animation: 'countdown', 可以自定义format, startVal, duration, animation
```