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