van-list 从其他页面返回van-list页面时候,:immediate-check=“false”属性无效,仍旧会触发默认load事件。 Screenshots Add screenshots to help explain your problem. Environment Device: win10 Browser: chrome Vant Version: Reproduce Provide the steps to reproduce and if possible a minimal demo of the proble...
三、为什么 List 初始化后会立即触发 load 事件? List 初始化后会触发一次 load事件,用于加载第一屏的数据,这个特性可以通过immediate-check属性关闭。 四、为什么会连续触发 load 事件? 如果一次请求加载的数据条数较少,导致列表内容无法铺满当前屏幕,List 会继续触发 load事件,直到内容铺满屏幕或数据全部加载完成。...
添加:immediate-check="false" <van-list v-model="loading" :finished="finished" :immediate-check="false" :error.sync="error" error-text="请求失败,点击重新加载" finished-text="没有更多了" @load="getList" > </van-list> 有用1 回复 DDD7: 感谢回答。不知道是不是我一开始看错了, 不是点...
解决 <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" :offset="10" :immediate-check="false" > 在mounted中进行第一次请求,在onLoad中进行判断请求 onLoad() { if(!this.isLoading) { this.getListData(); } } 是不是超easy~ __EOF__ 本文作者...
created() {this.onLoad();// 因为设置了 immediate-check="false" 所以加载完页面后要手动调用第一次的 onLoad 办法 }, onRefresh() { // 清空列表数据 this.finished =false; // 重置分页 this.pageParams.pageNo =0; this.pageParams.pageSize =10; ...
model="active"sticky@change="getTypeDate"><van-tabv-for="(tab) in typeList":title="tab.name":key="tab.id"><van-list:finished="finished":finished-text="finishedText"v-model="loading":offset="10":immediate-check="false"@load="getserviceList"><!--- 修改前代码 --->/*...
场景:前提 :immediate-check="false"1、上拉加载了多条数据2、滚动条停留在快要触发上拉加载的位置上3、刷新页面4、触发load事件
<van-tab v-for="(tab) in typeList" :title="tab.name" :key="tab.id"> <van-list :finished="finished":finished-text="finishedText"v-model="loading":offset="10":immediate-check="false"@load="getserviceList"> <!--- 修改前代码 ---> /*...
<van-pull-refreshv-model="isDownLoading"@refresh="onRefresh()"> <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" :immediate-check="false" :offset="20" > ... </van-list> </van-pull-refresh> 在chrome...
我是真的眼瞎 解决 在mounted 中进⾏第⼀次请求,在onLoad 中进⾏判断请求 是不是超easy~ <van-list v-model="loading":finished="finished"finished-text="没有更多了" @load="onLoad":offset="10":immediate-check="false"> onLoad() { if(!this.isLoading) { this.getListData();} } ...