mui的侧滑菜单如何禁用手势侧滑

百度了好久,发现只有这个能实现禁用

//禁止滑动主界面的时候出现侧滑菜单
document.getElementsByClassName('mui-inner-wrap')[0].addEventListener('drag', function(event) {
  event.stopPropagation();
});

以下两个均不能实现,大概是监听class那里参数不对

var offCanvasInner = offCanvasWrapper[0].querySelector('.mui-inner-wrap');
offCanvasInner.addEventListener('drag', function(event) {
    event.stopPropagation();
});

 

mui('.mui-inner-wrap').on('drag', function(event) {
event.stopPropagation();
});

  

 

转载于:https://www.cnblogs.com/xiede/p/9047240.html

你可能感兴趣的:(mui的侧滑菜单如何禁用手势侧滑)