mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
fix(Dialog): should reset loading when close (#4352)
This commit is contained in:
parent
beb4036572
commit
6a0bef37ca
@ -55,10 +55,12 @@ export default createComponent({
|
|||||||
if (this.beforeClose) {
|
if (this.beforeClose) {
|
||||||
this.loading[action] = true;
|
this.loading[action] = true;
|
||||||
this.beforeClose(action, state => {
|
this.beforeClose(action, state => {
|
||||||
if (state !== false) {
|
if (state !== false && this.loading[action]) {
|
||||||
this.onClose(action);
|
this.onClose(action);
|
||||||
}
|
}
|
||||||
this.loading[action] = false;
|
|
||||||
|
this.loading.confirm = false;
|
||||||
|
this.loading.cancel = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.onClose(action);
|
this.onClose(action);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user