brandSwitcher.ttml 613 Bytes

<view class='brand-switcher-container'>
  <block tt:for="{{data.brandsTextFilter}}" tt:key="{{unique}}">
    <view bindtap='switchBrandFliter' data-brand-fliter='{{index}}' style='display: flex; flex-direction: row;  justify-content: center; align-items: center;width: {{data.brandsTextFilter.length > 0 ? 100/data.brandsTextFilter.length : 1}}%;height: 88rpx;background-color: white;'>
    <text class="{{data.currentBrandFliter==index ? 'textSelected':'textNormal'}}">{{item.name}}</text>
    </view>
    <view class='separator' tt:if="{{data.brandsTextFilter.length != index + 1}}"></view>
  </block>
</view>