Swiper中文论坛

标题: 垂直滚动的swiper里面overflow-y:auto失效 [打印本页]

作者: zq010    时间: 2018-2-8 10:10
标题: 垂直滚动的swiper里面overflow-y:auto失效
swiper设置为垂直滚动模式,在slide中有个block的内容超出固定高度需要上下滚动查看其它内容,但这个内容区域滚动失效,有没有什么好的办法,急等,谢谢

作者: xunyagai    时间: 2018-2-9 11:33
我刚改完这个bug:
参考这两个属性
mousewheelEventsTarged : '元素名称',
mousewheelControl: true,
作者: WebLogic    时间: 2018-3-1 10:44
我也遇到了这个问题,同求
作者: hycomeon    时间: 2018-3-30 13:08
发表于 2018-3-1 10:44:04 | 只看该作者
我也遇到了这个问题,同求
作者: JoyTan    时间: 2018-4-8 17:16
新手路过
作者: sos    时间: 2018-4-10 11:32
新手路过
作者: 844682916@qq.co    时间: 2018-5-9 20:30
同问,触屏滑动无效,有好的解决方案吗
作者: 844682916@qq.co    时间: 2018-5-9 20:30
急急急急急急~~~~~~~~
作者: a814274811    时间: 2018-5-11 14:32
路过看看
作者: sy2358    时间: 2018-6-8 18:58
同求。。。。
作者: 844682916@qq.co    时间: 2018-11-27 10:49

              var startScroll, touchStart, touchCurrent;
              mySwiper.slides.on('touchstart', function (e) {
                startScroll = this.scrollTop;
                touchStart = e.targetTouches[0].pageY;
              }, true);
              mySwiper.slides.on('touchmove', function (e) {
                touchCurrent = e.targetTouches[0].pageY;
                var touchesDiff = touchCurrent - touchStart;
                var slide = this;
                var onlyScrolling =
                  (slide.scrollHeight > slide.offsetHeight) &&
                  (
                    (touchesDiff < 0 && startScroll === 0) ||
                    (touchesDiff > 0 && startScroll === (slide.scrollHeight - slide.offsetHeight)) ||
                    (startScroll > 0 && startScroll < (slide.scrollHeight - slide.offsetHeight))
                  );
                if (onlyScrolling) {
                  e.stopPropagation();
                }
              }, true);
作者: cxy2020918    时间: 2020-9-18 18:47
解决了吗楼主




欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/) Powered by Discuz! X3.2