We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0-beta.4
https://didi.github.io/cube-ui/example/#/scroll/v-scrolls
1.配置bs的click: true
click: true
2.监听内层bs内容的click事件
3.在移动端真机测试click产生bug
内外层bs配置click: true后, 在移动端能正常触发click事件
1.当内外层bs都配置click: true时: 外层能滚动阶段, click事件正常触发; 内层能滚动阶段, click事件无法触发
2.当只有innerScroll配置click: true时: 外层在滚动过程中, 一旦触碰到内层就会立即触发click事件; 而内层滚动和触发正常
3.当只有outerScroll配置click: true时: 效果同1
以上问题只出现在移动端, pc端正常触发
解决办法:
1.只给outerScroll配置click: true
2.在innerScroll变为enable时, 配置 innerScroll.options.click = true;
3.在innerScroll变为disable时, 配置innerScroll.options.click = false;
1.bs初始化配置:
initScroll () {
// outer
this.outerScroll = new BScroll(this.$refs.outerScroll, {
nestedScroll: true, probeType: 3, observeDOM: true, click: true, bounce: { bottom: false }
})
// inner
this.innerScroll = new BScroll(this.$refs.innerScroll, {
nestedScroll: true, probeType: 2, observeDOM: true, // click: true, bounce: { top: false }
}
2.解决bug的代码:
this.outerScroll.on('scroll', pos=> {
if (...something) { ... this.outerScroll.disable() this.innerScroll.enable() this.innerScroll.options.click = true } else { this.innerScroll.options.click = false }
The text was updated successfully, but these errors were encountered:
@zellzh 我试了一下,没啥问题啊,麻烦贴一下你的代码
Sorry, something went wrong.
@theniceangel https://github.com/zellzh/music_app/blob/home/src/views/Detail.vue 能在调用disable后只禁用touchmove, 而不禁用click吗? 可能会有这种需求, 比如禁用外层滚动的同时需要监听外层的click事件?
fixed at v2.1.0
theniceangel
No branches or pull requests
Version
2.0.0-beta.4
Reproduction link
https://didi.github.io/cube-ui/example/#/scroll/v-scrolls
Steps to reproduce
1.配置bs的
click: true
2.监听内层bs内容的click事件
3.在移动端真机测试click产生bug
What is expected?
内外层bs配置
click: true
后, 在移动端能正常触发click事件What is actually happening?
1.当内外层bs都配置
click: true
时: 外层能滚动阶段, click事件正常触发; 内层能滚动阶段, click事件无法触发2.当只有innerScroll配置
click: true
时: 外层在滚动过程中, 一旦触碰到内层就会立即触发click事件; 而内层滚动和触发正常3.当只有outerScroll配置
click: true
时: 效果同1以上问题只出现在移动端, pc端正常触发
解决办法:
1.只给outerScroll配置
click: true
2.在innerScroll变为enable时, 配置
innerScroll.options.click = true;
3.在innerScroll变为disable时, 配置innerScroll.options.click = false;
1.bs初始化配置:
initScroll () {
// outer
this.outerScroll = new BScroll(this.$refs.outerScroll, {
})
// inner
this.innerScroll = new BScroll(this.$refs.innerScroll, {
})
}
2.解决bug的代码:
this.outerScroll.on('scroll', pos=> {
})
The text was updated successfully, but these errors were encountered: