bodyScroll(event) {
event.preventDefault()
},
/**禁止页面滑动*/
noSliding() {
document.body.style.overflow = 'hidden';
document.addEventListener('touchmove', this.bodyScroll, false);//禁止页面滑动
},
/**允许页面滑动*/
sliding() {
document.body.style.overflow = '';//出现滚动条
document.removeEventListener('touchmove', this.bodyScroll, false);
},
vue移动端页面弹出遮罩层时禁止页面滚动
猜你喜欢
转载自blog.csdn.net/qq_2422941992/article/details/104217505
今日推荐
周排行