ソースを参照

fix: countUp style

yumingming11 5 年 前
コミット
dfb0b6f53f
2 ファイル変更4 行追加3 行削除
  1. 3 2
      src/packages/countup/countup.scss
  2. 1 1
      src/packages/countup/countup.vue

+ 3 - 2
src/packages/countup/countup.scss

@@ -9,14 +9,15 @@
     margin: 0 auto;
     padding: 0;
     overflow: hidden;
-    height: 50px;
-    line-height: 50px;
+    // height: 50px;
+    // line-height: 50px;
     text-align: center;
     font-weight: bold;
     position: relative;
     li {
       position: absolute;
       transition: none;
+      list-style: none;
       // transition: all linear .1s;
       // animation: myMove 1s linear infinite;
       // animation-fill-mode: forwards;

+ 1 - 1
src/packages/countup/countup.vue

@@ -49,7 +49,7 @@
       </template>
     </template>
     <template v-else>
-      <ul v-if="scrolling" class="run-number" :style="{ height: numHeight + 'px' }">
+      <ul v-if="scrolling" class="run-number" :style="{ height: numHeight + 'px', lineHeight: numHeight + 'px' }">
         <li
           ref="numberItem"
           v-for="(val, index) of num_total_len"