<view class="tabbar {{isIphoneX ? 'tabbar-safe' : ''}}">
  <view class="tabbar__inner">
    <view
      wx:for="{{list}}"
      wx:key="pagePath"
      class="tabbar__item"
      data-index="{{index}}"
      data-page-path="{{item.pagePath}}"
      bindtap="switchTab"
    >
      <image class="tabbar__icon" src="{{selected === item.pagePath ? item.selectedIconPath : item.iconPath}}" mode="aspectFit"></image>
      <text class="tabbar__text {{selected === item.pagePath ? 'tabbar__text--active' : ''}}">{{item.text}}</text>
    </view>
  </view>
</view>
