[new feature] Notify: add onOpened prop

This commit is contained in:
陈嘉涵
2019-05-30 14:29:59 +08:00
parent 333666f506
commit 5f5de381e8
7 changed files with 15 additions and 2 deletions
+7 -1
View File
@@ -25,6 +25,11 @@ function Notify(options: NotifyOptions) {
if (instance.onClick) {
instance.onClick(event);
}
},
opened() {
if (instance.onOpened) {
instance.onOpened();
}
}
}
});
@@ -54,7 +59,8 @@ function defaultOptions(): NotifyOptions {
duration: 3000,
className: '',
onClose: null,
onClick: null
onClick: null,
onOpened: null
};
}