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

1,使用mint-ui框架中<mt-popup></mt-popup>,在组件中加入 lockScroll="true" 阻止父页面不滑动。

2,原生弹框中,弹框页面中最外层div里面加(touchmove事件)@touchmove="handleTouchmove" 然后在methods方法里面加入 handleTouchmove (e) { e.preventDefault() }, 阻止父页面不滑动

 

 

原文点击:https://blog.csdn.net/qq_35430000/article/details/82225158?utm_source=copy

posted @ 2018-09-29 10:18  风雨飘飘飘啊飘  阅读(506)  评论(0编辑  收藏  举报