mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
fix(Dialog): should reset loading when close (#4352)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user