vant的PullRefresh 下拉刷新下拉过程中不断报错的解决办法


vant的PullRefresh 下拉刷新下拉过程中不断报错,错误提示如下:
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

如我的代码结构

1 <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
2     <ul class="flex">
3         <li v-for="(item,index) in piclist" :key="index" @click="check(item,index)">
4             <img :src="item.img+'?w=264&h=300'" alt="">
5             <span class="iconfont icon-xuanzhong" v-if="selectedIndex===index"></span>
6         </li>
7     </ul>
8 </van-pull-refresh>

给PullRefresh包裹的ul标签加一个样式

ul{ touch-action: none; }

就能解决报错的问题了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM