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

2020-06-11  本文已影响0人  Nicholas_liang

当滑动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();
});

上一篇 下一篇

猜你喜欢

热点阅读