zoukankan      html  css  js  c++  java
  • Mint-ui中loadmore(上拉加载下拉刷新)组件在ios中滑动会触发点击事件的解决方法

    bug说明:

    Mint-ui中loadmore(上拉加载下拉刷新)组件 在 使用fastclick的情况下

    ,在ios设备中滑动会触发点击事件;

    解决方法:

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

    路径如下:你的项目名/node_modulesmint-uilibloadmoreindex.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();
    ...
     
     
    困扰了很久终于搞定,同样遇到这个问题的小伙伴可以照我的方法去做了!!
  • 相关阅读:
    log4j基本使用方法
    Spring MVC中页面向后台传值的几种方式
    JXL操作Excel
    模板
    url&视图
    Git for PyCharm
    ServletConfig和ServletContext
    Exception和IOException之间的使用区别
    java学习一目了然——异常必知
    java学习一目了然——IO
  • 原文地址:https://www.cnblogs.com/web521/p/7815465.html
Copyright © 2011-2022 走看看