<!-- custom-tab-bar/index.wxml -->
<view class="tab-bar">
  <view 
    class="tab-item" 
    wx:for="{{tabList}}" 
    wx:key="pagePath"
    bindtap="switchTab"
    data-path="{{item.pagePath}}"
  >
    <!-- 图标：根据选中状态切换路径 -->
    <image 
      class="icon" 
      src="{{currentPath === item.pagePath ? item.selectedIconPath : item.iconPath}}"
      mode="widthFix"  
    ></image>
    <view class="text {{currentPath === item.pagePath ? 'active' : ''}}">
      {{item.text}}
    </view>
  </view>
</view>