1234567891011121314151617181920212223242526272829303132 |
- <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}}
- <slot name="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>
|