From 437144f41c74505d362a5214a18cec3d01b3ce4b Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 10 十月 2022 17:51:30 +0800
Subject: [PATCH] 2022.10.10

---
 component/switchtab/switchtab.wxml |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/component/switchtab/switchtab.wxml b/component/switchtab/switchtab.wxml
index 9137a41..36d92a4 100644
--- a/component/switchtab/switchtab.wxml
+++ b/component/switchtab/switchtab.wxml
@@ -1,8 +1,8 @@
 <!--component/switchtab/switchtab.wxml-->
 <view class="swiper-tab">
-  <scroll-view class="swiper-tab_view" scroll-left="{{navScrollLeft}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
+  <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 class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav">
+      <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>
@@ -11,7 +11,7 @@
 </view>
 
 <swiper current="{{currentTab}}" class="swiper-box" duration="300" bindchange="bindChange" style="height: {{pageheight}};">
-  <block wx:for="{{pageList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
+  <block wx:for="{{tabList}}" wx:key="index">
     <swiper-item>
       <view class="page{{index}}">
         <slot name="slot{{index}}"></slot>

--
Gitblit v1.9.3