本文整理汇总了TypeScript中toastr.info函数的典型用法代码示例。如果您正苦于以下问题:TypeScript info函数的具体用法?TypeScript info怎么用?TypeScript info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了info函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: switch
this.toastsPromise.then((toasts: IToast[]) => {
for (let t of toasts){
//Setup callbacks to track dismisal status
let overrides: ToastrOptions = {
onclick: () => {
ToastService.acknowledgeToast(t.Id, this.context.pageContext.web.id);
},
onCloseClick: () => {
ToastService.acknowledgeToast(t.Id, this.context.pageContext.web.id);
}
};
switch (t.Severity){
case 'Warning':
toastr.warning(t.Message, t.Title, overrides);
break;
case 'Error':
toastr.error(t.Message, t.Title, overrides);
break;
case 'Success':
toastr.success(t.Message, t.Title, overrides);
break;
default:
toastr.info(t.Message, t.Title, overrides);
break;
}
}
}).catch((error: any): void => {
示例2:
listenerFunction = event => {
if (event.id === "saving") {
toastr.info(localizedNotification, "", {
positionClass: "toast-top-left",
preventDuplicates: true,
showDuration: 300,
hideDuration: 300,
timeOut: 1000,
extendedTimeOut: 1000,
showEasing: "swing",
showMethod: "fadeIn",
hideEasing: "linear",
hideMethod: "fadeOut",
messageClass: "toast-for-saved-message",
iconClass: ""
});
}
};
示例3: showInfoMessage
/**
* Show info message using toaster library
*/
showInfoMessage(message: string, title: string): void {
toastr.info(message, title);
}
示例4: info
info(message: string, title?: string) {
return toastr.info(message, title);
}
示例5: info
this.socket.on("UPDATE_REDUX", action => {
info("Realtime update coming in!");
this.store.dispatch(action)
});
示例6: next
return next().then((a: any) => { console.log(a.status); toastr.info(a.status); return a;});