<view class="tab-bar">
  <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-text="{{item.text}}" bindtap="switchTab">
    <image class="icon" src="{{selected === item.pagePath ? item.selectedIconPath : item.iconPath}}"></image>
    <view class="text" style="color: {{selected === item.pagePath ? selectedColor : color}}">{{item.text}}</view>
  </view>
</view>
