Tab.wxml
688 Bytes
<wxs src="./Tab.wxs" module="filterUtils" />
<block>
<scroll-view class="tab-box flex" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}" style="{{tabBoxStyle}}">
<block wx:for="{{tab}}" wx:key="index" wx:for-index="index">
<view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; margin-left: {{index == 0 ? 60 : 32}}rpx" bindtap="click" data-count="{{index}}">
<view class="text text-center" style="{{tabBoxStyle}}">{{item}}</view>
<view wx:if="{{!noLine}}" class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>