闫增涛
2024-02-29 0d1323fb39db5e8d3b124e61303bde1b1352b887
custom-tab-bar/index.wxml
@@ -1,18 +1,11 @@
<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="index"
   >
<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="index">
      <view class="custom-tab-bar-wrapper">
         <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" />
      <!-- <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" />
      <view class="text">{{ item.text }}</view> -->
      <t-image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="heightFix" width="22" height="22" />
      <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="heightFix" width="22" height="22" />
         <view class="text">{{ item.text }}</view>
      </view>
   </t-tab-bar-item>
</t-tab-bar>