使用mint-ui中弹框组件与原生弹框阻止父页面不滑动方法

1,使用mint-ui框架中<mt-popup></mt-popup>,在组件中加入 lockScroll="true" 阻止父页面不滑动。
2,原生弹框中,弹框页面中最外层div里面加(touchmove事件)@touchmove="handleTouchmove" 然后在methods方法里面加入 
  handleTouchmove (e) {
    e.preventDefault()
  },
阻止父页面不滑动

  

 

猜你喜欢

转载自www.cnblogs.com/xingxingzi/p/9262137.html