better-scroll在Pad中点击事件失效问题

时间:2021-09-02 07:29:26   收藏:0   阅读:12

文档链接地址:

better-scroll github basic docs:https://github.com/ustbhuangyi/better-scroll/blob/master/README_zh-CN.md

better-scroll 1.x docs:https://better-scroll.github.io/docs-v1/#/zh

better-scroll 2.x docs:https://better-scroll.github.io/docs/zh-CN/

 

背景:

公司需要在Pad上的内部App中嵌入一个Pc端的项目。那么滑动的滚动条采用的就是better-scroll。

 

问题:

滚动条渲染成功,滚动主体可以使用手指滑动。但是凡是在此滚动条主体内部的dom的点击事件全部失效。

 

解决方案

查询better-scroll文档,才发现如下描述:

  click

更改后果然生效了

let scroll = new BScroll(‘.wrapper‘,{
    scrollY: true,
    click: true
})

 

原文:https://www.cnblogs.com/wangweizhang/p/15211585.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!