diff --git a/docs/examples-docs/popup.md b/docs/examples-docs/popup.md index 8fc181920..b1b21909a 100644 --- a/docs/examples-docs/popup.md +++ b/docs/examples-docs/popup.md @@ -39,7 +39,6 @@ export default { methods: { handlePopupButtonClick() { - this.popupShow1 = false; this.popupShow4 = true; } } diff --git a/packages/zanui-css/src/popup.css b/packages/zanui-css/src/popup.css index b62ad788b..262c12c7e 100644 --- a/packages/zanui-css/src/popup.css +++ b/packages/zanui-css/src/popup.css @@ -6,6 +6,7 @@ top: 0; left: 0; background-color: rgba(0, 0, 0, 0.701961); + transition: background-color .5s ease-out; } @b popup { diff --git a/src/mixins/popup/popup-manager.js b/src/mixins/popup/popup-manager.js index 52c2d547e..a2bf28d9d 100644 --- a/src/mixins/popup/popup-manager.js +++ b/src/mixins/popup/popup-manager.js @@ -83,7 +83,7 @@ const PopupManager = { document.body.appendChild(modalDom); - if (zIndex && !hasModal) { + if (zIndex) { modalDom.style.zIndex = zIndex; } modalDom.style.display = ''; @@ -114,12 +114,10 @@ const PopupManager = { if (modalStack.length === 0) { setTimeout(() => { - if (modalStack.length === 0) { - if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom); + if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom); - modalDom.style.display = 'none'; - this.modalDom = null; - } + modalDom.style.display = 'none'; + this.modalDom = null; }, 200); } }