mirror of https://github.com/ElemeFE/element
代码优化
parent
257da9b01c
commit
851813f6d8
|
@ -134,7 +134,7 @@ export default {
|
||||||
PopupManager.closeModal(this._popupId);
|
PopupManager.closeModal(this._popupId);
|
||||||
this._closing = false;
|
this._closing = false;
|
||||||
}
|
}
|
||||||
PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade, this.independentModal ? true : false);
|
PopupManager.openModal(this._popupId, PopupManager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade, this.independentModal);
|
||||||
if (props.lockScroll) {
|
if (props.lockScroll) {
|
||||||
this.withoutHiddenClass = !hasClass(document.body, 'el-popup-parent--hidden');
|
this.withoutHiddenClass = !hasClass(document.body, 'el-popup-parent--hidden');
|
||||||
if (this.withoutHiddenClass) {
|
if (this.withoutHiddenClass) {
|
||||||
|
|
|
@ -45,7 +45,6 @@ const getModal = function() {
|
||||||
|
|
||||||
return modalDom;
|
return modalDom;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const instances = {};
|
const instances = {};
|
||||||
|
@ -127,11 +126,10 @@ const PopupManager = {
|
||||||
modalDom.tabIndex = 0;
|
modalDom.tabIndex = 0;
|
||||||
modalDom.style.display = '';
|
modalDom.style.display = '';
|
||||||
if (independent) {
|
if (independent) {
|
||||||
independentModalArr.push(modalDom)
|
independentModalArr.push(modalDom);
|
||||||
} else {
|
} else {
|
||||||
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
closeModal: function(id) {
|
closeModal: function(id) {
|
||||||
|
|
Loading…
Reference in New Issue