浏览代码

fix(progress): icon center

Drjingfubo 3 年之前
父节点
当前提交
ac1cf651b1

+ 1 - 3
src/packages/__VUE/progress/doc.taro.md

@@ -67,9 +67,7 @@ app.use(Progress);
         <nut-progress percentage="60" :text-inside="true">
           <img
             src="https://img11.360buyimg.com/imagetools/jfs/t1/137646/13/7132/1648/5f4c748bE43da8ddd/a3f06d51dcae7b60.png"
-            width="30"
-            height="30"
-            style="display: block"
+            style="display: block; width: 30px; height: 30px"
           />
         </nut-progress>
       </nut-cell>

+ 2 - 0
src/packages/__VUE/progress/index.scss

@@ -85,6 +85,8 @@
     font-size: 13px;
     line-height: 1;
     min-width: 35px;
+    display: flex;
+    align-items: center;
   }
   .nut-progress-insidetext {
     padding: $progress-insidetext-padding;

+ 1 - 1
src/packages/__VUE/progress/index.vue

@@ -34,7 +34,7 @@
         </div>
       </div>
     </div>
-    <div class="nut-progress-text" :style="{ lineHeight: height }" v-if="showText && !textInside">
+    <div class="nut-progress-text" v-if="showText && !textInside">
       <template v-if="status == 'active' || status == ''">
         <span :style="textStyle">{{ percentage }}{{ isShowPercentage ? '%' : '' }}</span>
       </template>