美文网首页
使用better-scroll时需要注意!!!!cancelab

使用better-scroll时需要注意!!!!cancelab

作者: Nicholas_liang | 来源:发表于2020-06-11 10:33 被阅读0次

当滑动Scroll区域的时候频繁报错


截屏2020-06-03 下午3.46.44.png

Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
此时,你需要看一下ScrollView的parentDom是否存在scroll-x:scroll属性;直接去掉就可以解决。

如果你的页面是在移动端使用 滚动出现抖动 需要添加事件

parentDom.addEventListener('touchstart', (e) => {
e.stopPropagation();
e.preventDefault();
});

相关文章

网友评论

      本文标题:使用better-scroll时需要注意!!!!cancelab

      本文链接:https://www.haomeiwen.com/subject/uwwqahtx.html