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