fix(Dialog): should reset loading when close (#4352)

This commit is contained in:
neverland 2019-09-03 20:59:43 +08:00 committed by GitHub
parent beb4036572
commit 6a0bef37ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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