tabBar.wxml 1.13 KB
<template name="tabBar">
  <view class="flex-h flex-hsb tab-bar" style="color: {{tabBar.color}}; background: {{tarBar.backgroundColor}}; {{tabBar.position=='top'? 'top: 0' : 'bottom: 0'}}; {{tabBar.borderStyle? (tabBar.position=='top'? 'border-bottom: solid 1px '+tabBar.borderStyle + ';' : 'border-top: solid 1px '+tabBar.borderStyle + ';') : ''}}">
    <block wx:for="{{tabBar.list}}" wx:key="pagePath">
      <navigator url="{{item.pagePath}}" open-type="redirect" class="menu-item {{tabBar.num==4?'number25':''}} {{tabBar.num==3?'number33':''}}{{tabBar.num==2?'number50':''}}{{tabBar.num==1?'number100':''}} " style="{{item.active? 'color: '+(item.selectedColor? item.selectedColor : tabBar.selectedColor) : ''}}">
        <image src="{{item.selectedIconPath}}" wx:if="{{item.active}}" style="width:40rpx; height:40rpx;"></image>
        <image src="{{item.iconPath}}" wx:if="{{!item.active}}" style="width:40rpx; height:40rpx;"></image>
        <text style="font-size:30rpx;">{{item.text}}</text>
      </navigator>
    </block>
  </view>
  <view class="tanchu1">
  <block>
  <navigator></navigator>
  </block>
  </view>
</template>