Mint-ui中loadmore(上拉加载下拉刷新)组件在ios中滑动会触发点击事件的解决方法...
生活随笔
收集整理的這篇文章主要介紹了
Mint-ui中loadmore(上拉加载下拉刷新)组件在ios中滑动会触发点击事件的解决方法...
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
bug說明:
Mint-ui中l(wèi)oadmore(上拉加載下拉刷新)組件 在 使用fastclick的情況下
,在ios設(shè)備中滑動會觸發(fā)點擊事件;
?
解決方法:
我是按需引入,去項目中找到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(); ... 困擾了很久終于搞定,同樣遇到這個問題的小伙伴可以照我的方法去做了!!轉(zhuǎn)載于:https://www.cnblogs.com/web521/p/7815465.html
總結(jié)
以上是生活随笔為你收集整理的Mint-ui中loadmore(上拉加载下拉刷新)组件在ios中滑动会触发点击事件的解决方法...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: EasyUI——实现展示后台数据代码
- 下一篇: HDU3247 Resource Arc