1.禁止页面滚动
//禁止页面滑动
stop() {
var box = function(e) {
passive: false;
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", box, false);
},
2.取消页面禁止滚动
//允许页面滑动
move() {
var box = function(e) {
passive: false
};
document.body.style.overflow = ''; //出现滚动条
document.removeEventListener("touchmove", box, false);
},