Mint-ui中loadmore(上拉加載下拉刷新)組件在ios中滑動會觸發點擊事件的解決方法


bug說明:

Mint-ui中loadmore(上拉加載下拉刷新)組件 在 使用fastclick的情況下

,在ios設備中滑動會觸發點擊事件;

 

解決方法:

我是按需引入,去項目中找到loadmore下的index.js,全部引入的要找mint下面mint-ui.common.js

路徑如下:你的項目名/node_modules\mint-ui\lib\loadmore\index.js

搜索 handleTouchEnd ,記得寫event進去

handleTouchEnd: function handleTouchEnd(event) {...}
 

然后在down和up兩個事件中加入 我標注的紅字即可!

if (this.direction === 'down' && this.getScrollTop(this.scrollEventTarget) === 0 && this.translate > 0) {
event.preventDefault();
event.stopPropagation();
...
if (this.direction === 'up' && this.bottomReached && this.translate < 0) {
event.preventDefault();
event.stopPropagation();
...
 
 
困擾了很久終於搞定,同樣遇到這個問題的小伙伴可以照我的方法去做了!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM