2023-03-06 17:57:39 +08:00

25 lines
752 B
Plaintext

<wxs src="../common/utils.wxs" module="_" />
<view
style="{{ customStyle }}"
class="{{_.cls(classPrefix + '__group', [['narrow', siblingCount > 4], ['roomy', siblingCount <= 2]])}}"
bind:touchstart="onTouchStart"
catch:touchmove="onTouchMove"
bind:touchend="onTouchEnd"
bind:touchcancel="onTouchEnd"
>
<view
class="{{classPrefix}}__wrapper"
style="transition: transform {{ duration }}ms cubic-bezier(0.215, 0.61, 0.355, 1); transform: translate3d(0, {{ offset }}px, 0)"
>
<view
class="{{_.cls(classPrefix + '__item', [['active', curIndex == index]])}}"
wx:for="{{options}}"
wx:key="index"
wx:for-item="option"
data-index="{{ index }}"
>
{{option.label}}
</view>
</view>
</view>