swiper实现左右滑动切换新闻页,每个item里面是一个scroll-view显示分页数据,加载到底7.8页左右,真机就会白屏,无任何报错信息。原来以为是setData数据过大的问题,改用了recycle-view来做,还是会在真机白屏,无任何报错信息。
<swiper class="homepage-mainpart-tab-content" current="{{currentSecondTab}}" duration="300" bindchange="switchSecondTab">
<swiper-item wx:for="{{secondtabbar}}" wx:key="index">
<scroll-view class="homepage-mainpart-scroll {{isIphoneX ? 'iphonex' : ''}}" scroll-y scroll-with-animation style="height:calc(100vh - 278px);" scroll-y="true" bounces="true" upper-threshold="40px" lower-threshold="40px" bindscrolltolower="lowerEventhandle" bindscroll="scrollEventhandle" refresher-enabled="true" bindrefresherrefresh="onRefresh" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}">
<view class="content-list-details">
<view class="content-list-item" wx:for="{{contentItem}}" wx:key="index" bindtap="toDetail" data-index="{{index}}">
<view class="container-item">
<view class="item-title">
<view class="top-box" wx:if="{{item.top}}">TOP</view>{{item.PIM_TITLE}}
</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>