禁止页面滚动
/** * (展示遮罩层时)阻止页面滚动 * @method disableScroll * @chainable */ disableScroll: function() { docElem.detach('touchmove', this._preventScroll); docElem.on('touchmove', this._preventScroll); if (isHuaweiP6) { docElem.addClass('m-mask-disable-scroll'); bodyElem.addClass('m-mask-disable-scroll'); } docElem.addClass('m-mask-disabled'); return this; }, /** * (关闭遮罩层时)恢复页面滚动 * @method enableScroll * @chainable */ enableScroll: function() { docElem.detach('touchmove', this._preventScroll); if (isHuaweiP6) { docElem.removeClass('m-mask-disable-scroll'); bodyElem.removeClass('m-mask-disable-scroll'); } docElem.removeClass('m-mask-disabled'); return this; }, /** * 阻止页面滚动回调 * @method _preventScroll * @param {EventFacade} e 事件对象 * @protected */ _preventScroll: function(e) { e.preventDefault(); },