index.wxml 1.1 KB

1234567891011121314151617181920212223
  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> -->
  9. <view class="tab-bar">
  10. <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
  11. <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
  12. <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
  13. </view>
  14. <view class="red-dot" data-path="{{list[2].pagePath}}" data-index="{{2}}" bindtap="switchTab" hidden="{{redDot == '0'}}">
  15. <view>
  16. <view>
  17. <text>{{redDot}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>