浏览代码

fix(rate): 半星情况出现颜色差异 #810

richard1015 4 年之前
父节点
当前提交
4279f1da32
共有 3 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      src/packages/__VUE/rate/index.scss
  2. 1 1
      src/packages/__VUE/rate/index.taro.vue
  3. 1 1
      src/packages/__VUE/rate/index.vue

+ 1 - 0
src/packages/__VUE/rate/index.scss

@@ -28,6 +28,7 @@
         left: 0;
         top: 0;
         overflow: hidden;
+        height: auto !important;
       }
     }
   }

+ 1 - 1
src/packages/__VUE/rate/index.taro.vue

@@ -17,7 +17,7 @@
         @click="onClick(2, n)"
         :font-class-name="fontClassName"
         :class-prefix="classPrefix"
-        :color="n <= modelValue ? activeColor : voidColor"
+        :color="n <= modelValue + 1 ? activeColor : voidColor"
         :size="iconSize"
         :name="checkedIcon"
       />

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

@@ -21,7 +21,7 @@
         class="nut-rate-item__icon nut-rate-item__icon--half"
         :font-class-name="fontClassName"
         :class-prefix="classPrefix"
-        :color="n <= modelValue ? activeColor : voidColor"
+        :color="n <= modelValue + 1 ? activeColor : voidColor"
         :size="iconSize"
         :name="checkedIcon"
       />