index.wxml 715 B

123456789101112
  1. <t-tab-bar class="custombar" value="{{active}}" bindchange="onChange" split="{{false}}" style="--td-tab-bar-bg-color: #f9f9f9;">
  2. <t-tab-bar-item wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index" value="{{item.pagePath}}">
  3. <view class="custom-tab-bar-wrapper">
  4. <!-- <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" /> -->
  5. <view class="icon-wrap">
  6. <t-image t-class="icon" src="{{item.selectedIconPath}}" mode="aspectFill" wx:if="{{index === active}}" />
  7. <t-image t-class="icon" src="{{item.iconPath}}" mode="aspectFill" wx:else />
  8. </view>
  9. <view class="text pt-2"><text>{{ item.text }}</text></view>
  10. </view>
  11. </t-tab-bar-item>
  12. </t-tab-bar>