百度了好久,發現只有這個能實現禁用
//禁止滑動主界面的時候出現側滑菜單
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();
});
