diff --git a/packages/dialog/src/dialog.js b/packages/dialog/src/dialog.js index 0a3ff9623..fa295ac15 100644 --- a/packages/dialog/src/dialog.js +++ b/packages/dialog/src/dialog.js @@ -24,7 +24,7 @@ const defaultCallback = action => { } }; -var initInstance = () => { +const initInstance = () => { instance = new DialogConstructor({ el: document.createElement('div') }); @@ -32,7 +32,7 @@ var initInstance = () => { instance.callback = defaultCallback; }; -var showNextDialog = () => { +const showNextDialog = () => { if (!instance) { initInstance(); } diff --git a/src/mixins/popup/popup-manager.js b/src/mixins/popup/popup-manager.js index c339df3a9..9ba799094 100644 --- a/src/mixins/popup/popup-manager.js +++ b/src/mixins/popup/popup-manager.js @@ -52,6 +52,9 @@ const PopupManager = { } }, + /** + * 遮罩层点击回调,`closeOnClickOverlay`为`true`时会关闭当前`popup` + */ handleOverlayClick() { const topModal = PopupManager.modalStack[PopupManager.modalStack.length - 1]; if (!topModal) return;