8***@qq.com
8***@qq.com
  • 发布:2022-11-10 16:34
  • 更新:2022-11-10 16:59
  • 阅读:220

【报Bug】nvue页面 list 长列表的事件 @scroll @loadmore 时有时无的响应

分类:HBuilderX

产品分类: HbuilderX

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win7

HBuilderX版本号: 3.6.8

示例代码:

<list v-if="showList" class="image-list" :style="{'height':windowHeight+'px;','width':windowWidth+'px;'}" :show-scrollbar="true" :scrollable="true" loadmoreoffset="500" @loadmore="loadMore" @scroll="watchScroll"> <cell v-for="(v,k) in listData2" :key="k" > <view class="chapter-item" :style="{'width':+windowWidth+'px;'}"> <image :style="{'width':+windowWidth+'px;'}" :src="v.imageUrl" mode="widthFix" class="chapter-image" ></image> </view> </cell> </list>

listData2 = [{id:1,imageUrl:'xxx'},{id:2,imageUrl:'xxx'}....]

操作步骤:

``
<list v-if="showList" class="image-list" :style="{'height':'300px;','width':'300px;'}" :show-scrollbar="true" :scrollable="true" loadmoreoffset="500" @loadmore="loadMore" @scroll="watchScroll">
<cell v-for="(v,k) in listData2" :key="k" >
<view class="chapter-item" :style="{'width':+windowWidth+'px;'}">
<image :style="{'width':+windowWidth+'px;'}" :src="v.imageUrl" mode="widthFix" class="chapter-image" ></image>
</view>
</cell>
</list>

data() {
return {
listData2:[
{id:1,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:2,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:3,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:4,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:5,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:6,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:7,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:8,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:9,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:10,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:11,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
{id:12,imageUrl:'https://pic.rmb.bdstatic.com/bjh/down/b539a6cb92fa55f7840b064eba78b07d.jpeg'},
],
}
}

method:{
watchScroll(e){
console.log(e)
},
loadMore(){
console.log('触底了')
}
}
``

预期结果:

HbuilderX编译并同步到手机上,滑动列表 @scroll @loadmore 都能正常触发

实际结果:

响应时有时无,这次编译同步到手机上可以,下次或者下下次,事件就不触发了,好似偶发性
@scroll @loadmore

bug描述:

响应时有时无,这次编译同步到手机上可以,下次或者下下次编译并同步后,事件就不触发了,好似偶发性
@scroll @loadmore

2022-11-10 16:34 负责人:无 分享
已邀请:
8***@qq.com

8***@qq.com (作者)

其他代码引起,此BUG不存在

要回复问题请先登录注册