mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-14 20:34:19 +08:00
30 lines
977 B
TypeScript
30 lines
977 B
TypeScript
import notificationManager from "../../../module/notification";
|
|
|
|
const NotificationUtils = {
|
|
show: function (options: any) {
|
|
return notificationManager.show(options);
|
|
},
|
|
|
|
success: function (title: string, content?: string, duration?: number) {
|
|
return notificationManager.show({ title, content, type: 'success', duration });
|
|
},
|
|
|
|
error: function (title: string, content?: string, duration?: number) {
|
|
return notificationManager.show({ title, content, type: 'error', duration });
|
|
},
|
|
|
|
warning: function (title: string, content?: string, duration?: number) {
|
|
return notificationManager.show({ title, content, type: 'warning', duration });
|
|
},
|
|
|
|
info: function (title: string, content?: string, duration?: number) {
|
|
return notificationManager.show({ title, content, type: 'info', duration });
|
|
},
|
|
|
|
clear: function () {
|
|
return notificationManager.clear();
|
|
},
|
|
}
|
|
|
|
export { NotificationUtils }
|