Closed miaotmac closed 8 years ago
支持,将fixPage参数设为false即可
谢谢,可以了。
fixPage 可以定义你想设置的白名单元素,设为false则为全部不阻止默认事件
补充一个问题,这样设置之后左右上下滑动都没问题了 但是 当我左右滑动图片时 页面会触发上下滑动 ,上下滑动的时候总是会触发左右滑动,体验很不好 想请问下 怎样才能让左右滑动时 禁止上下滑动 以及 上下滑动时禁止左右轮播图片的滑动
滑动阻止滚动:onSlideStart 的时候阻止掉页面的scroll,滚动阻止滑动:因为XY轴都会产生位移,判断起来比较麻烦,你可以设置 fingerRecognitionRange(滑动切换的识别区域,默认10px),加大这个值可以让滑动的触发范围增大(也就滑动轴位移必须大于这个值才会触发),用来缓解另一个轴的滚动产生的误差
谢谢 滑动阻止滚动 效果不错 只是增大fingerRecognitionRange的值后 依然会触发滑动 并且偶尔还会产生卡顿 页面布局就乱了 不过总的来说 效果还是不错的 !!
请问怎么设置左右或者上下滑动的方向呢,比如从左往右,从右往左,从上往下,从下往上
图片轮播的时候,左右滑动可以切换图片,上下滑动目前没有反应,我希望上下滑动可以滚动页面,左右滑动可以切换轮播图,请问目前支持吗?