Simon He @ simonhe.me

nums-wheel

Jul 26 · 2day

Author: Simon

中文 Chinese Version

This article is documentation that describes the encapsulated utility functions @simon_he/nums-wheel

peculiarity: High scalability, flexible and convenient calling

More

Instructions for use

npm i @simon_he/s-charts # install

import { 
  numsWheel,
  ...
 } from '@simon_he/nums-wheel' # Ingestion on demand

Directory structure

numsWheel

  • Digital wheel control
  • Based on the odometer package, it is simpler to use in the business
  • params:
    • container: string | HTMLElement /* Parent container */
    • options: { format: '(,ddd)' | '(,ddd).dd' | '(.ddd),dd' | '( ddd),dd' | 'd' /* Number format / startVal: number / The starting number / endVal: number / Final number / duration: number / The duration of the animation / animation: 'count' | 'countdown' / Animation mode */ }
numWheel('#main', {  endVal: 9000.12 }) // Default format: '(,ddd).dd' startVal: 0 duration: 500 animation: 'countdown', Can be customized format, startVal, duration, animation

GitHub

Welcome to PR