litian
2024-03-26 10db09788d74b441a2efd85f5d4614e944b07bb3
custom-tab-bar/index.wxml
@@ -10,8 +10,8 @@
<view class="tabBarBox">
  <view class="tabItem" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="changeTab" data-num="{{index}}">
    <view class="custom-tab-bar-wrapper">
      <t-image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="aspectFill" width="22" height="22" />
      <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="aspectFill" width="22" height="22" />
      <t-image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="aspectFit" width="22" height="22" />
      <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="aspectFit" width="22" height="22" />
      <view class="text {{active == index ? 'activeText' : ''}}">{{ item.text }}</view>
    </view>
  </view>