소스 검색

fix(CountTo): Fix displaying empty string when the value is 0 (#864)

MARVIN 3 년 전
부모
커밋
82eb72bbce
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/CountTo/src/CountTo.vue

+ 1 - 1
src/components/CountTo/src/CountTo.vue

@@ -84,7 +84,7 @@
       }
 
       function formatNumber(num: number | string) {
-        if (!num) {
+        if (!num && num !== 0) {
           return '';
         }
         const { decimals, decimal, separator, suffix, prefix } = props;