Skip to content

WYuanyang/wxapp-animateNumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wxapp-animateNumber

微信小程序--滚动数字 ##效果展示 mahua

##使用方式

  // pages/main/index.js
import NumberAnimate from "../../utils/NumberAnimate";
   // pages/main/index.js
  let n1 = new NumberAnimate({
        from:num1,//开始时的数字
        speed:2000,// 总时间
        refreshTime:100,//  刷新一次的时间
        decimals:3,//小数点后的位数
        onUpdate:()=>{//更新回调函数
          this.setData({
            num1:n1.tempValue
          });
        },
        onComplete:()=>{//完成回调函数
            this.setData({
              num1Complete:" 完成了"
            });
        }
    });

##有问题反馈 在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

About

微信小程序--滚动数字

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published