From e3a07bc70bdf3c1c551436963389a2c431689559 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Wed, 3 Mar 2021 10:01:59 -0300 Subject: [PATCH] Adds loading state to number block and countup component to animate numbers. #483 --- package-lock.json | 10 +++++++ package.json | 2 ++ src/views/reports/components/number-block.vue | 28 ++++++++++++++----- src/views/reports/pages/reports-list.vue | 19 ++++++++----- src/views/reports/reports.vue | 1 + 5 files changed, 46 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6efb55564..ce25176e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3005,6 +3005,11 @@ } } }, + "countup.js": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.0.7.tgz", + "integrity": "sha512-FO0nQdvG1iQwHp28wdvkErxnNUSbdkzztqZ6YNHKLHydngD2tdiKEW8dFrqpahF3tj+Ma70h0vyYrCBzxlVWdg==" + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -10791,6 +10796,11 @@ "resolved": "https://registry.npmjs.org/vue-blurhash/-/vue-blurhash-0.1.4.tgz", "integrity": "sha512-B76GgfHXHkdmYgAfI2rZl3BgCMD9OxAgn4Jw2Ro0a8ZoAKa6gqTWUrTo5EGXOftm/EKuMYi1Cc+UcAvV0jnoRw==" }, + "vue-countup-v2": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vue-countup-v2/-/vue-countup-v2-4.0.0.tgz", + "integrity": "sha512-XjKeHo1ndRlJtXvHd6B1eWOpbrJDdNU3rdYZwVPv2YlUXbvthsBT4kms5Fc/mn9RdXPrMX2H/ktAAQtKjWFisw==" + }, "vue-eslint-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", diff --git a/package.json b/package.json index c77aa34c9..c80a72740 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "blurhash": "^1.1.3", "buefy": "^0.9.4", "bulma": "^0.9.1", + "countup.js": "^2.0.7", "css-vars-ponyfill": "^2.3.1", "mdi": "^2.2.43", "moment": "^2.25.3", @@ -27,6 +28,7 @@ "vue-apexcharts": "^1.6.0", "vue-awesome-swiper": "^4.1.1", "vue-blurhash": "^0.1.4", + "vue-countup-v2": "^4.0.0", "vue-masonry-css": "^1.0.3", "vue-router": "^3.1.6", "vue-the-mask": "^0.11.1", diff --git a/src/views/reports/components/number-block.vue b/src/views/reports/components/number-block.vue index 3f347a7b0..2ff9d63fb 100644 --- a/src/views/reports/components/number-block.vue +++ b/src/views/reports/components/number-block.vue @@ -1,6 +1,10 @@