index.wxml 1001 B

12345678910111213141516171819202122
  1. <!-- #elif <cover-view class="tab-bar">
  2. <cover-view class="tab-bar-border"></cover-view>
  3. <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
  4. <cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
  5. <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
  6. </cover-view>
  7. </cover-view>-->
  8. <cover-view class="tab-bar">
  9. <cover-view class="tab-bar-border"></cover-view>
  10. <cover-view
  11. wx:for="{{list}}"
  12. wx:key="index"
  13. class="tab-bar-item"
  14. data-path="{{item.pagePath}}"
  15. data-index="{{index}}"
  16. bindtap="switchTab"
  17. >
  18. <cover-image class="tab-bar-icon" src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
  19. <cover-view class="tab-bar-text" style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
  20. </cover-view>
  21. </cover-view>