在竖向滑动bs里嵌套横向滑动bs,无法兼容横向滑动区域内点击和横竖向滑动响应
yelin1597532 opened this issue · 0 comments
yelin1597532 commented
What problem does this feature solve?
在竖向滑动bs里嵌套横向滑动bs的情况下。由于在两个bs里都有内容需要点击,根据文档里的说明,为了避免横向bs内容点击发出两次click事件,我必须在横向bs里设置stopPropagation:true。这样会吧所有事件都阻止冒泡,导致手指在横向bs区域内上下滑的话无法触发竖向bs的滑动。但如果不设置stopPropagation:true,虽然可以解决横向bs区域内的竖向滑动响应问题,点击横向bs内的元素又会触发2次click
What does the proposed API look like?
提供click专用的stopPropagation设置,比如stopClickPropagation,用来单独组织click事件的冒泡