代码优化

pull/21168/head
赵运通 2021-07-20 18:00:56 +08:00
parent 257da9b01c
commit 851813f6d8
2 changed files with 2 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {