vue-蒙层弹窗里的内容滚动。外层大页面禁止滚动

 

此需求 有两种方法,第一种,这种方法适用于,底层 和弹窗是两个平行的没有关系的两部分。重叠(https://blog.csdn.net/yuhk231/article/details/74171734)

$(".weui-mask").on("touchstart",function(ev){
            var e = ev || window.event;
            e.stopPropagation();
            e.preventDefault();
            alert(e)
     },false);

  

 第二种,这种方法比较适用于父子集关系的页面 中(https://blog.csdn.net/zgh0711/article/details/80368710)

 在index.html中


  在全局css中

body.dialog-open {
    position: fixed;
    width: 100%;
}

  

对话框弹出后调用

ModalHelper.afterOpen();

对话框关闭前调用

ModalHelper.beforeClose();

 

转载于:https://www.cnblogs.com/peko/p/10012166.html

你可能感兴趣的:(vue-蒙层弹窗里的内容滚动。外层大页面禁止滚动)