SHARE
TWEET

Untitled

a guest Jun 26th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. import data from '~/static/data.json';
  3. export default {
  4.     data ({ params }) {
  5.         return {
  6.             data
  7.         }
  8.     }
  9. }
  10. </script>
  11.      
  12. methods: {
  13.     countUp(value) {
  14.         for (let i = 0; i <= value; i++) {
  15.             setTimeout(() => {
  16.                 return i;
  17.             }, 100);
  18.         }
  19.     }
  20. }
  21.      
  22. <template>
  23.     <div>
  24.        <p>{{countUp(data.number)}}</p>
  25.     </div>
  26. </template>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top