Bläddra i källkod

【缺陷修复】su-tabbar-item 选中或未选中标签属性名称和父组件 su-tabbar 保持一致

puhui999 7 månader sedan
förälder
incheckning
a2ba10f796
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      sheep/ui/su-tabbar-item/su-tabbar-item.vue

+ 4 - 4
sheep/ui/su-tabbar-item/su-tabbar-item.vue

@@ -9,7 +9,7 @@
         <image
           v-if="icon"
           :name="icon"
-          :color="isActive ? parentData.activeColor : parentData.color"
+          :color="isActive ? parentData.activeColor : parentData.inactiveColor"
           :size="20"
         ></image>
         <block v-else>
@@ -30,7 +30,7 @@
         <text
           class="u-tabbar-item__text"
           :style="{
-            color: isActive ? parentData.activeColor : parentData.color,
+            color: isActive ? parentData.activeColor : parentData.inactiveColor,
           }"
         >
           {{ text }}
@@ -120,8 +120,8 @@
         addStyle,
         parentData: {
           value: null,
-          activeColor: '',
-          color: '',
+          activeColor: '', // 选中标签的颜色
+          inactiveColor: '', // 未选中标签的颜色
         },
         parent: {},
       };