js digital amount rolling animation (implemented by vue)

Thank you for your reference- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper, but also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper, but also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper, but also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper, but also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use- http://bjbsair.com/2020-03-27/tech-info/7082/ vue amount scrolling animation

<template>  
  <div>  
    <div class="head" @click="this.numFun(0,5000)">Click amount change</div>  
   <div>{{amount}}</div>  
  </div>  
</<template>  
  
  
<script>  
export default {  
  data () {  
  return {  
    amount: 0  
  }  
}  
methods: {  
    //Amount change animation  
    numFun(startNum,maxNum) {  
      var that = this  
      let numText = startNum;  
      let golb; // To clear the requestAnimationFrame  
      function numSlideFun(){ // Digital animation  
          numText+=5; // The calculation of speed can be decimal. The larger the number, the faster the scroll  
          if(numText >= maxNum){  
              numText = maxNum;  
              cancelAnimationFrame(golb);  
          }else {  
              golb = requestAnimationFrame(numSlideFun);  
          }  
        that.amount=numText  
        // console.log(numText)  
      }  
       numSlideFun(); // Call digital animation  
    }  
  }  
}  

Of course, vue is a mature children's paper. It also has its corresponding plug-in vue count to:

https://www.npmjs.com/package/vue-count-to

This is quite easy to use

Tags: Vue

Posted on Fri, 27 Mar 2020 05:18:38 -0700 by reneeshtk