riku
2022-09-15 bd3a9d7086f5a428b385599ba2cb08299b22c0df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!--component/switchtab/switchtab.wxml-->
<view class="swiper-tab">
  <scroll-view class="swiper-tab_view" scroll-into-view="item{{currentTab}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
    <block wx:for="{{tabList}}" wx:key="i">
      <view id="item{{index}}" class="swiper-tab-list {{extClass}} {{currentTab==index ? 'on ' + extClassOn : ''}}" data-current="{{index}}" bindtap="swichNav">
        {{item.name}}
        <text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text>
      </view>
    </block>
  </scroll-view>
</view>
 
<swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};">
  <block wx:for="{{tabList}}" wx:key="index">
    <swiper-item>
      <view class="page{{index}}">
        <slot name="slot{{index}}"></slot>
      </view>
    </swiper-item>
  </block>
</swiper>