ios遮罩层滚动穿透问题

问题描述:使用 position: fixed; 设置蒙层后,在安卓上正常,ios上下滑动会造成底层盒子上下滚动

  

 

解决方案:

  设置当前元素(设置了fixed定位)的父级元素,设置overflow: hidden

  watch: {
    // 解决ios遮罩层滚动穿透问题
    visible: {
      handler(flag) {
        const parentNode = document.querySelector('.more-operations').parentNode
        parentNode.style.overflowY = flag ? 'hidden' : 'auto'
      }
    }
  }

 

v-model和sync封装【更多操作】弹层

 

posted @ 2022-03-19 15:14  吴小明-  阅读(709)  评论(0编辑  收藏  举报