scroll-view 嵌套循环 IOS卡顿,如何解决?
发布于 7 年前 作者 dingjuan 873 次浏览 来自 官方Issues

两个scroll-view联动,左边是年份,右边是项目,在安卓上正常,IOS导致页面卡顿严重。

代码如下:

<scroll-view class="VerticalNav nav" scroll-y scroll-with-animation scroll-top="{{VerticalNavTop}}" style="height:calc(100vh - 375rpx);">
          <view class="cu-item flex align-center justify-center {{index==TabCur?'text-green cur':''}}" wx:for="{{listseries}}" wx:key="index" bindtap='tabSelect' data-id="{{index}}" wx:for-item="item">
            {{item.name}}
          </view>
        </scroll-view>
        <scroll-view class="VerticalMain" scroll-y scroll-with-animation style="height:calc(100vh - 375rpx);-webkit-overflow-scrolling : touch;" scroll-into-view="main-{{MainCur}}" bindscroll="VerticalMain">
          <view class="m-xs" wx:for="{{listseries}}" wx:key="index" id="main-{{index}}" style="background:white">
            <view class='cu-bar solid-bottom bg-white flex-sub'>
              <view class='action text-center' style="height: 50rpx">
                <text class='cuIcon-title text-green'></text> {{item.name}} </view>
            </view>
            <view class="mt-xs mb-xs">
              <view class="flex flex-wrap align-center">
                <view class="pl-xs text-xs basis-df flex align-center {{items.select==true?'status0':''}}" wx:for="{{cardset}}" style="height: 80rpx" wx:for-item="items" wx:key="indexs" catchtap="selectset" data-id="{{index}}" wx:if="{{item.name==items.list__pubTime}}">
                  <image src="{{items.list__img}}" class="mana mr-xs"></image>{{items.list__name}}
              </view>
              </view>
            </view>
          </view>
          <view class=" mb-df"></view>
        </scroll-view>
1 回复
bindscroll="VerticalMain"    scroll-view上绑定了这个方法,方法里有渲染数据吗
回到顶部