index.wxml 503 B

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