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

