<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar" style="display: {{ show ? 'flex' : 'none'}}">
  <view
    wx:for="{{list}}"
    wx:key="index"
    class="tab-bar-item {{ item.center ? 'center' : ''}}"
    data-path="{{item.pagePath}}"
    data-index="{{index}}"
    bindtap="switchTab"
  >
    <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
    <view style="color: {{selected === index ? selectedColor : color}};z-index: 1;">{{item.text}}</view>
  </view>
</view>
