<view class="tab-bar">
  <view class="mask" wx:if="{{mask}}"></view>
  <view wx:for="{{listTab}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}"
    bindtap="switchTab">
    <view class="noticeTips" wx:if="{{item.pagePath=='/pages/message/index'&&userInfo.mCount>0}}">
      {{userInfo.mCount}}</view>
    <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
    <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
  </view>
</view>