Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simon-he95/numswheel


https://github.com/simon-he95/numswheel

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        


numsWheel


NPM version


Docs


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
```