在style中添加全局样式
<style>
* {
touch-action: none;
}
</style>
在script中阻止浏览器默认滑动事件。
document.addEventListener('touchmove', function (event) {
event.preventDefault();
}, false);
最后再加相应的滑动事件
$('.box').swipeLeft(
function(){
console.log('swipeLeft')
}
)