//实现滚动条无法滚动 var mo=function(e){e.preventDefault();}; /***禁止滑动***/ function stop(){ document.body.style.overflow='hidden'; document.addEventListener("touchmove",mo,false);//禁止页面滑动 } /***取消滑动限制***/ function move(){ document.body.style.overflow='';
报错: vue报这个错 [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted 方案1:使用css3 touch-action: none; 属性: touch-action :当你触摸并按住触摸目标时候,禁止或显示系统默认菜单. touch-act