178 Star 852 Fork 244

yoby / weui

 / 详情

iscroll.js的小瑕疵

已完成
创建于  
2018-08-25 23:20

移动端左右滑动很流畅,但是手指放到滑动块的ul位置上下滚动不起作用,本来想自己改代码,但是你的代码精简过了,我找了几个反编译没成功.....
myScroll = new iScroll('scrollpanel', {
// other options go here...
hScroll: true,
onBeforeScrollStart: function ( e ) {
if ( this.absDistX > (this.absDistY + 5 ) ) {
// user is scrolling the x axis, so prevent the browsers' native scrolling
e.preventDefault();
}
},
//解决第一次无法滑动的问题
onTouchEnd: function () {
var self = this;
if (self.touchEndTimeId) {
clearTimeout(self.touchEndTimeId);
}

    self.touchEndTimeId = setTimeout(function () {
            self.absDistX = 0;
            self.absDistY = 0;
    }, 600);
}

});
我在网上找到的解决方案,可能改成这样就好了......https://www.cnblogs.com/CooLLYP/p/6500931.html 这是链接

评论 (0)

王浩宇 创建了任务
yoby 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
JavaScript
1
https://gitee.com/yoby/weui.git
git@gitee.com:yoby/weui.git
yoby
weui
weui

搜索帮助

14c37bed 8189591 565d56ea 8189591