mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Dialog: promise status not change (#585)
This commit is contained in:
parent
408579a046
commit
78b0d78b44
11
dist/dialog/index.js
vendored
11
dist/dialog/index.js
vendored
@ -77,12 +77,21 @@ create({
|
||||
this.onClose(action);
|
||||
},
|
||||
|
||||
close() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
onClose(action) {
|
||||
if (!this.data.asyncClose) {
|
||||
this.setData({ show: false });
|
||||
this.close();
|
||||
}
|
||||
this.$emit('close', action);
|
||||
this.$emit(action);
|
||||
|
||||
const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
|
||||
if (callback) {
|
||||
callback(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -77,12 +77,21 @@ create({
|
||||
this.onClose(action);
|
||||
},
|
||||
|
||||
close() {
|
||||
this.setData({ show: false });
|
||||
},
|
||||
|
||||
onClose(action) {
|
||||
if (!this.data.asyncClose) {
|
||||
this.setData({ show: false });
|
||||
this.close();
|
||||
}
|
||||
this.$emit('close', action);
|
||||
this.$emit(action);
|
||||
|
||||
const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
|
||||
if (callback) {
|
||||
callback(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user