[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example becaus

vue引用swiper在chrome浏览器下报

网上找到很多人说修改 css  touch-action: none; 可以解决此问题,此方案未解决。

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example becaus_第1张图片

swiper.js?82ca:2795 [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
onTouchMove @ swiper.js?82ca:2795

 

于是找到 swiper原文件,node_modules=》swiper 下面的 swiper.js,第2795行 屏蔽  // e.preventDefault();,不再报错了。

swiper.allowClick = false;

// e.preventDefault();

if (params.touchMoveStopPropagation && !params.nested) {

e.stopPropagation();

}

你可能感兴趣的:(web)