index.wxml 1.1 KB

123456789101112131415161718
  1. <!--custom-tab-bar/index.wxml-->
  2. <view class="tabbar_box" style="background-color:{{tabbar.backgroundColor}}" catchtouchmove="{{true}}">
  3. <block wx:for="{{tabbar.list}}" wx:key="index">
  4. <block wx:if="{{item.show}}">
  5. <view wx:if="{{item.isSpecial}}" class="tabbar_nav" hover-class="none" bind:tap="goBar" data-item="{{item}}" data-index="{{index}}" url="{{item.pagePath+'?title='+(item.title || item.text)}}" style="color:{{tabbar.selectedColor}}" open-type="switchTab">
  6. <view class='special-wrapper'>
  7. <view class="tabbar_icon iconfont {{item.iconfont}}" src="{{item.iconPath}}"></view>
  8. </view>
  9. <view class='special-text-wrapper'></view>
  10. <text>{{item.text}}</text>
  11. </view>
  12. <view wx:else class="tabbar_nav" hover-class="none" bind:tap="goBar" data-item="{{item}}" data-index="{{index}}" style="color:{{selectIndex == index ? tabbar.selectedColor : tabbar.color}}" open-type="switchTab">
  13. <view class="tabbar_icon iconfont {{item.iconfont}}" src="{{item.selected ? item.selectedIconPath : item.iconPath}}"></view>
  14. <text>{{item.text}}</text>
  15. </view>
  16. </block>
  17. </block>
  18. </view>