<list class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore(index)">
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">
<div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '24px'}" :class="{'refresh-icon-active': refreshFlag}"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading" :contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{refreshText}}</text>
</div>
</refresh>
<cell v-if="index==0">
<uni-banner :city="city" :regionCount="regionCount" :allcount="allcount" :banner='banner' :bannerIndex="bannerIndex"></uni-banner>
<scroller scroll-direction="horizontal" scrollToBegin="false" class='top-bar'>
<view v-for="(item,index) in timeType" :key="index">
<view @click='changeTime(index)' class="index-tab-list">
<text :class="[curIndex === index ? 'tab-active' : '']" class="index-tab-font">{{item.label}}</text>
</view>
</view>
</scroller>
</cell>
<cell v-if="index==0">
<view style="flex-direction: row;justify-content: space-between;width: 750rpx;" :style="{'padding-left': padding+'px','padding-right': padding+'px'}">
<view style="width:340rpx;">
<view v-for="(active,idx1) in timeType[curIndex].list" v-bind:key='idx1'>
<uni-index-item v-if="idx1%2==0" ref='uniIndexItem' :curIndex="curIndex" :active="active"></uni-index-item>
</view>
</view>
<view style="width:340rpx;">
<view v-for="(active,idx2) in timeType[curIndex].list" v-bind:key='idx2' style="width:340rpx;">
<uni-index-item v-if="idx2%2!=0" ref='uniIndexItem' :curIndex="curIndex" :active="active"></uni-index-item>
</view>
</view>
</view>
</cell>
<cell v-else style="width: 750rpx;" v-for="(active,idx) in tabList[index].list" :key='idx'>
<uni-active-item :active="active"></uni-active-item>
</cell>
<cell v-if="isLoading">
<view class="loading-more">
<text class="loading-more-text">{{loadingText}}</text>
</view>
</cell>
<cell v-if="!isLoading" class="loading-more">
<text class="loading-more-text">{{tab.loadingText}}</text>
</cell>
<loading class="loading-more" @loading="loadMore(index)" :display="isLoading ? 'show' : 'hide'">
<view class="loading-more">
<text class="loading-more-text">{{loadingText}}</text>
</view>
</loading>
</list>
- 发布:2020-11-26 20:14
- 更新:2020-11-27 12:01
- 阅读:649
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 18363.1198
HBuilderX类型: 正式
HBuilderX版本号: 2.9.8
手机系统: iOS
手机系统版本号: iOS 13.4
手机厂商: 苹果
手机机型: iPod touch(第七代)
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
见附件视频
见附件视频
预期结果:
见附件视频
见附件视频
实际结果:
见附件视频
见附件视频
bug描述:
app升级成uini-app编译方式后,在nvue页面中,list组件嵌套scroller组件显示,滚动list时,scroller组件会被重置(滚到开始的位置),scroller组件的属性scrollToBegin不生效,这怎么解决?