const PASSIVE = function (e) {
e.preventDefault();
}
// 禁止
document.body.style.overflow = \'hidden\';
document.addEventListener(\'touchmove\', PASSIVE, {
passive: false,
});
// 恢复
document.body.style.overflow = \'auto\';
document.removeEventListener(\'touchmove\', PASSIVE, {
passive: false,
});
相关文章: