mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
[bufix] Dialog: default options (#2208)
This commit is contained in:
parent
ccf37b9a76
commit
5493dd3aee
@ -30,6 +30,7 @@ const Dialog = options => {
|
|||||||
Object.assign(instance, {
|
Object.assign(instance, {
|
||||||
resolve,
|
resolve,
|
||||||
reject,
|
reject,
|
||||||
|
...Dialog.currentOptions,
|
||||||
...options
|
...options
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -53,13 +54,9 @@ Dialog.defaultOptions = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Dialog.alert = options => Dialog({
|
Dialog.alert = Dialog;
|
||||||
...Dialog.currentOptions,
|
|
||||||
...options
|
|
||||||
});
|
|
||||||
|
|
||||||
Dialog.confirm = options => Dialog({
|
Dialog.confirm = options => Dialog({
|
||||||
...Dialog.currentOptions,
|
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
...options
|
...options
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user