文档链接地址:
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文档,才发现如下描述:
boolean
false
_constructed
,值为 true。更改后果然生效了
let scroll = new BScroll(‘.wrapper‘,{
scrollY: true,
click: true
})
原文:https://www.cnblogs.com/wangweizhang/p/15211585.html