<view class="c-tab-spacer"></view>
<view class="c-tab-outer">
  <view class="c-tab-bar">
    <block wx:for="{{tabList}}" wx:key="index">
      <view
        class="c-tab-item"
        data-path="{{item.pagePath}}"
        data-index="{{index}}"
        catchtap="switchTab"
      >
        <view class="c-tab-dot" wx:if="{{item.pagePath === 'pages/messages/messages' && badgeText}}">
          <text class="c-tab-dot-t">{{badgeText}}</text>
        </view>
        <image
          class="c-tab-ico"
          mode="aspectFit"
          src="{{selectedIndex === index ? item.selectedIconPath : item.iconPath}}"
        />
        <text class="c-tab-txt {{selectedIndex === index ? 'c-tab-txt-on' : ''}}">{{item.text}}</text>
      </view>
    </block>
  </view>
</view>
