mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feature] Dialog: beforeClose add callback parameters (#1166)
This commit is contained in:
@@ -80,8 +80,10 @@ export default create({
|
||||
handleAction(action) {
|
||||
if (this.beforeClose) {
|
||||
this.loading[action] = true;
|
||||
this.beforeClose(action, () => {
|
||||
this.onClose(action);
|
||||
this.beforeClose(action, state => {
|
||||
if (state !== false) {
|
||||
this.onClose(action);
|
||||
}
|
||||
this.loading[action] = false;
|
||||
});
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user