feat: 快速预定的颜色调整
This commit is contained in:
@@ -6,8 +6,7 @@
|
|||||||
activeIndex === index && 'tab-item-active',
|
activeIndex === index && 'tab-item-active',
|
||||||
]" @click="handleTabClick(index)">
|
]" @click="handleTabClick(index)">
|
||||||
<view class="tab-item-inner flex flex-items-center">
|
<view class="tab-item-inner flex flex-items-center">
|
||||||
<uni-icons class="icon mr-4" fontFamily="znicons" size="20"
|
<uni-icons :class="['icon mr-4', activeIndex === index && 'icon-active']" fontFamily="znicons" size="20" color="opacity">
|
||||||
:color="activeIndex === index ? indicatorColor : '#525866'">
|
|
||||||
{{ zniconsMap[item.icon] }}
|
{{ zniconsMap[item.icon] }}
|
||||||
</uni-icons>
|
</uni-icons>
|
||||||
|
|
||||||
@@ -48,7 +47,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
indicatorColor: {
|
indicatorColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#1890ff',
|
default: "#1890ff"
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,11 @@
|
|||||||
.icon {
|
.icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
color: #525866;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-active {
|
||||||
|
color: $theme-color-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 组件模板中使用了绝对定位的内部元素,为保证父元素宽度基于内容,重置该子元素为静态布局 */
|
/* 组件模板中使用了绝对定位的内部元素,为保证父元素宽度基于内容,重置该子元素为静态布局 */
|
||||||
|
|||||||
Reference in New Issue
Block a user