0.0.3 • Published 3 years ago

@simon_he/nums-wheel v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

此文是simon-js-tool额外的numsWheel文档

更多

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' 动画方式 }
numWheel('#main', {  endVal: 9000.12 }) // 默认format: '(,ddd).dd' startVal: 0 duration: 500 animation: 'countdown', 可以自定义format, startVal, duration, animation