From 0282feb1730724ba66c2e57ab354099afa074e81 Mon Sep 17 00:00:00 2001 From: RockerHX Date: Mon, 14 Nov 2022 10:51:39 +0800 Subject: [PATCH] Fix: count can't display when endValue is 0. --- src/components/custom/CountTo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/custom/CountTo.vue b/src/components/custom/CountTo.vue index 03c08abf..73144b30 100644 --- a/src/components/custom/CountTo.vue +++ b/src/components/custom/CountTo.vue @@ -77,7 +77,7 @@ function start() { } function formatNumber(num: number | string) { - if (!num) { + if (num !== 0 && !num) { return ''; } const { decimals, decimal, separator, suffix, prefix } = props;