mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] Dialog: beforeClose add callback parameters (#1166)
This commit is contained in:
parent
e5978a1ab9
commit
ea76777ec7
@ -80,8 +80,10 @@ export default create({
|
|||||||
handleAction(action) {
|
handleAction(action) {
|
||||||
if (this.beforeClose) {
|
if (this.beforeClose) {
|
||||||
this.loading[action] = true;
|
this.loading[action] = true;
|
||||||
this.beforeClose(action, () => {
|
this.beforeClose(action, state => {
|
||||||
this.onClose(action);
|
if (state !== false) {
|
||||||
|
this.onClose(action);
|
||||||
|
}
|
||||||
this.loading[action] = false;
|
this.loading[action] = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user