<view class="tab-bar">
  <view
    wx:for="{{list}}"
    wx:key="index"
    class="tab-item {{selected === index ? 'active' : ''}}"
    data-index="{{index}}"
    data-path="{{item.pagePath}}"
    bind:tap="switchTab"
  >
    <view class="tab-icon">{{item.icon}}</view>
    <view class="tab-text">{{item.text}}</view>
  </view>
</view>
