32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
<wxs src="./tabs.wxs" module="filters" />
|
|
<view class="{{prefix}}-class {{classPrefix}} {{classPrefix}}--{{placement}}">
|
|
<scroll-view class="{{classPrefix}}__scroll" enable-flex scroll-x="{{isScrollX}}" scroll-y="{{isScrollY}}">
|
|
<view class="{{classPrefix}}__nav">
|
|
<view
|
|
wx:for="{{tabs}}"
|
|
wx:key="index"
|
|
data-index="{{index}}"
|
|
class="{{classPrefix}}__item {{prefix}}-class-item {{item.disabled ? (prefix + '-is-disabled') : '' }} {{currentIndex === index ? prefix + '-is-active ' + prefix + '-class-active' : ''}}"
|
|
bind:tap="onTabTap"
|
|
>
|
|
{{item.label}}
|
|
</view>
|
|
<view class="{{classPrefix}}__track {{prefix}}-class-track" style="{{trackStyle}}" />
|
|
</view>
|
|
</scroll-view>
|
|
<view
|
|
class="{{classPrefix}}__content"
|
|
bind:touchstart="onTouchStart"
|
|
bind:touchmove="onTouchMove"
|
|
bind:touchend="onTouchEnd"
|
|
bind:touchcancel="onTouchEnd"
|
|
>
|
|
<view
|
|
class="{{classPrefix}}__content-inner "
|
|
style="{{ filters.animate({duration: animate.duration,currentIndex:currentIndex, direction}) }}"
|
|
>
|
|
<slot />
|
|
</view>
|
|
</view>
|
|
</view>
|