mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feauture] Notify: add onClose option
This commit is contained in:
@@ -53,6 +53,7 @@ function defaultOptions(): NotifyOptions {
|
||||
background: RED,
|
||||
duration: 3000,
|
||||
className: '',
|
||||
onClose: null,
|
||||
onClick: null
|
||||
};
|
||||
}
|
||||
@@ -60,6 +61,10 @@ function defaultOptions(): NotifyOptions {
|
||||
Notify.clear = () => {
|
||||
if (instance) {
|
||||
instance.value = false;
|
||||
|
||||
if (instance.onClose) {
|
||||
instance.onClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user