litian
2024-09-07 ce3a08b28c16f5cce2185167f8a9030ee16898ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!-- <t-tab-bar value="{{active}}" bindchange="onChange" split="{{false}}">
  <t-tab-bar-item wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="id">
    <view class="custom-tab-bar-wrapper">
      <t-image class="tabImg" src="{{active == item.id ? item.activeIcon : item.icon}}" width="22" height="22"></t-image>
      <view class="text">{{ item.text }}</view>
    </view>
  </t-tab-bar-item>
</t-tab-bar> -->
 
<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">
      <view class="tab-images">
        <image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="aspectFit" />
        <image wx:else class="tabImg" src="{{item.activeIcon}}" mode="aspectFit" />
      </view>
      <view class="text {{active == index ? 'activeText' : ''}}">{{ item.text }}</view>
    </view>
  </view>
</view>