<view class="tab-bar" tt:if="{{list.length!=0}}">
    <view class="tab-bar-border"></view>
    <view tt:for="{{list}}" tt:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="navigateTo">
      <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image>
      <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
    </view>
  </view>
  