You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
470 B

  1. <!--miniprogram/custom-tab-bar/index.wxml-->
  2. <view class="tab-bar" wx:if="{{list.length!=0}}">
  3. <view class="tab-bar-border"></view>
  4. <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
  5. <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
  6. <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
  7. </view>
  8. </view>