feat: 快速预定的颜色调整

This commit is contained in:
2026-03-11 16:36:43 +08:00
parent 25d5593ff1
commit 0b3d193b2f
2 changed files with 7 additions and 3 deletions

View File

@@ -6,8 +6,7 @@
activeIndex === index && 'tab-item-active',
]" @click="handleTabClick(index)">
<view class="tab-item-inner flex flex-items-center">
<uni-icons class="icon mr-4" fontFamily="znicons" size="20"
:color="activeIndex === index ? indicatorColor : '#525866'">
<uni-icons :class="['icon mr-4', activeIndex === index && 'icon-active']" fontFamily="znicons" size="20" color="opacity">
{{ zniconsMap[item.icon] }}
</uni-icons>
@@ -48,7 +47,7 @@ const props = defineProps({
},
indicatorColor: {
type: String,
default: '#1890ff',
default: "#1890ff"
},
});

View File

@@ -24,6 +24,11 @@
.icon {
height: 20px;
width: 20px;
color: #525866;
}
.icon-active {
color: $theme-color-500;
}
/* 组件模板中使用了绝对定位的内部元素,为保证父元素宽度基于内容,重置该子元素为静态布局 */