From 6a0bef37caa0ebac12336781e8b998525ad0f518 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 3 Sep 2019 20:59:43 +0800 Subject: [PATCH] fix(Dialog): should reset loading when close (#4352) --- src/dialog/Dialog.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dialog/Dialog.js b/src/dialog/Dialog.js index a29424b2e..7b0d2d3fd 100644 --- a/src/dialog/Dialog.js +++ b/src/dialog/Dialog.js @@ -55,10 +55,12 @@ export default createComponent({ if (this.beforeClose) { this.loading[action] = true; this.beforeClose(action, state => { - if (state !== false) { + if (state !== false && this.loading[action]) { this.onClose(action); } - this.loading[action] = false; + + this.loading.confirm = false; + this.loading.cancel = false; }); } else { this.onClose(action);