From 602d3958b8b8f0c7eb6a7826f8f8e2b0b24cf4a3 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 13 Dec 2019 15:48:06 +0800 Subject: [PATCH] fix(Dialog): show not trigger close event when hidden (#5267) --- src/dialog/Dialog.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dialog/Dialog.js b/src/dialog/Dialog.js index 34033905c..32bf459f1 100644 --- a/src/dialog/Dialog.js +++ b/src/dialog/Dialog.js @@ -56,6 +56,11 @@ export default createComponent({ handleAction(action) { this.$emit(action); + // show not trigger close event when hidden + if (!this.value) { + return; + } + if (this.beforeClose) { this.loading[action] = true; this.beforeClose(action, state => {