• 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();
    ...
     
     
    困扰了很久终于搞定,同样遇到这个问题的小伙伴可以照我的方法去做了!!
  • 相关阅读:
    javascript window.Event对象
    sql 命令
    ASP.NET 2.0实现防止同一用户同时登陆
    设计模式(抽象工厂模式)
    javascript幻灯片
    javascript window.open
    c# 注册表操作
    大话英语
    oracle 插入、合并、查询、聚合操作
    guy,mistake
  • 原文地址:https://www.cnblogs.com/web521/p/7815465.html
Copyright © 2020-2023  润新知