明隆
明隆
  • 发布:2023-09-22 10:57
  • 更新:2023-09-22 10:57
  • 阅读:139

【报Bug】nvue下list组件部分低端机型多次下拉触底操作,触底事件再也无法触发

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

手机系统: Android

手机系统版本号: Android 8.1

手机厂商: 小米

手机机型: 红米5plus

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: CLI

CLI版本号: 3.8.12

示例代码:
<view :style="{height:windowHeightList}"> <list class="list" :style="{height:windowHeightList}" :show-scrollbar="false" :loadmoreoffset="50" @loadmore="loadMore" ref="list"> <refresh display="refreshing ? 'show' : 'hide'" @refresh="onrefresh"
@pullingdown="onpullingdown"
@click="reFresh"
>
<view class="loading-more-down">
<image v-if="refreshText=='3'" style="width: 108rpx;height:24rpx;" src="@/static/load-list.gif"></image>
<view v-if="refreshText=='2' || refreshText=='1'" style="width: 108rpx;height:24rpx;">
<image style="width: 108rpx;height:24rpx;" src="@/static/load-list.png"></image>
</view>
</view>
</refresh>
</cell>
<cell v-for="(item,index) in list" key="item.resumeId"

ref="'cell'+index"> <resumeItem :info="item" :url="'/pages/resume/detail/detail?id=' + item.resumeId"/>
</cell>
<cell v-if="list.length > 6">
<view class="loading-more">
<image v-if="!noData" style="width: 108rpx;height:24rpx;" src="@/static/load-list.gif"></image>
<text :class="list.length > 6 && noData?'loading-more-text-accomplish':'loading-more-text'">{{list.length > 6 && noData?'- THE END -':''}}</text>
</view>
</cell>

</list>  

</view>
<script>
methods: {
//下拉操作
onpullingdown(e){
//当正在刷新的时候直接返回
if(this.refreshing){
return;
}
if (Math.abs(e.pullingDistance) > 60) {
//当下拉的距离大于fresh组件的高度
this.refreshText = "1";
} else {
this.refreshText = "2";
}
},
//释放加载
onrefresh(){
if(this.loading){
//当正在调用接口获取数据时,此时的下拉不做任何操作
return;
}
this.refreshText="3";
//刷新数据
//模拟接口延迟
this.loading = true;
this.refreshing = true;
this.params.pageNum = 1
this.loadHotList()
},
//触底加载
loadMore(){
if (this.count <= this.list.length) {
this.$store.commit('home/setNoData', true)
return
}
this.loadHotList()
},
//加载列表
async loadHotList() {
const {
data,
count,
success
} = await this.loadApi()//列表数据
if(success){
const curList = data;
this.count = count
if (this.params.pageNum === 1) {
this.list = [];
}
this.params.pageNum += 1
this.list = this.list.concat(curList); // 追加新数据
this.resetLoadmore()
this.getUserRoleNew = false
if(this.list.length){
if(this.count <= this.list.length){
this.$store.commit('home/setNoData', true)
}else{
this.$store.commit('home/setNoData', false)
}
this.noShow = false
this.loading = false;
this.refreshing = false;
this.refreshText="";
this.loadErr = false;
}else{
this.loading = false;
this.refreshing = false;
this.refreshText="";
this.loadErr = false;
}
}
},
// 重置 loadmore
resetLoadmore() {
this.$refs["list"].resetLoadmore();
},
}
</script>

操作步骤:

nvue下list组件部分低端机型(红米5plus)多次下拉触底操作,触底事件再也无法触发

预期结果:

nvue下list组件部分低端机型(红米5plus)多次下拉触底操作,触底事件能正常触发

实际结果:

nvue下list组件部分低端机型(红米5plus)多次下拉触底操作,触底事件再也无法触发

bug描述:

nvue下list组件部分低端机型(红米5plus)多次下拉和触底操作,触底事件再也无法触发

2023-09-22 10:57 负责人:无 分享
已邀请:

要回复问题请先登录注册