當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript toastr.success函數代碼示例

本文整理匯總了TypeScript中toastr.success函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript success函數的具體用法?TypeScript success怎麽用?TypeScript success使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了success函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: showUINotificationInfo

function showUINotificationInfo(uiNotificationInfo: UINotificationInfo) {
  if (uiNotificationInfo.succeeded) {
    toastr.success(uiNotificationInfo.successMessage);
  } else {
    toastr.error(uiNotificationInfo.errorMessage);
  }
}
開發者ID:Lemoncode,項目名稱:react-typescript-samples,代碼行數:7,代碼來源:uiNotificationMware.ts

示例2: 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 => {
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:28,代碼來源:SpfxToastrApplicationCustomizer.ts

示例3: stopTimer

 stopTimer(valid?: boolean): void {
   if (this.proccessing) {
     console.log('Stop Timer');
     if (valid) {
       this.endTime = lodash.now();
       this.textFinished = this.text;
       this.textMissed = null;
       toastr.success('PERFECT! ' + this.result + '\nLet\'s watch True-time Replay.'); // alert('COMPLETED! ' + this.result + "\nLet's watch True-time Replay.");
       this.startTruetimeReplay();
     } else {
       this.textMissed = this.text;
     }
     this.text = null;
     this.proccessing = false;
   }
 }
開發者ID:ovrmrw,項目名稱:shuttle-store-sample,代碼行數:16,代碼來源:page4.component.ts

示例4: showSuccessToast

 public static showSuccessToast(title: string, details: string, duration: number = 1000) {
     Notifications.setupToastrOptions(duration, true);
     toastr.success(details, title);
 }
開發者ID:sumitkm,項目名稱:sumitmaitra.com,代碼行數:4,代碼來源:st-notifications.ts

示例5:

 this.busyHandler.handle(obs$).subscribe((result:AuthenticationResult) => {
     window.localStorage.setItem(LOCALSTORAGE_AUTH, JSON.stringify(result));
     this.store.dispatch({type: DATA_AUTHENTICATION_SET_AUTHENTICATION, payload: result});
     toastr.success("successfully logged in!");
 }, (errorResponse:Response) => {
開發者ID:kurtdevocht,項目名稱:winecellar,代碼行數:5,代碼來源:authentication.service.ts

示例6:

 this.busyHandlerService.handle(obs$).map(resp => resp.json()).subscribe((result: AuthenticationResult) => {
     window.localStorage.setItem(LOCALSTORAGE_AUTH, JSON.stringify(result));
     this.store.dispatch(setAuthentication(result));
     toastr.success("successfully logged in!");
 }, (errorResponse: Response) => {
開發者ID:appcoreopc,項目名稱:winecellar,代碼行數:5,代碼來源:authentication.service.ts

示例7:

 return this.http.delete(`/api/schedulers/${this.schedulerName}/calendars/${this.name}`).then(() => {
     toastr.success(`Calendar ${this.name} deleted successfully`);
     return this.router.navigate("calendars");
 });
開發者ID:Indifer,項目名稱:quartznet,代碼行數:4,代碼來源:calendar-details.ts

示例8: activate

 activate()
 {
     toastr.success('tets')
 }
開發者ID:GooRiOn,項目名稱:AwesomeCalendar,代碼行數:4,代碼來源:register.ts

示例9: showSuccess

export function showSuccess(message) {
    toastr.success(message);
}
開發者ID:DavidOnGitHub,項目名稱:questionApp_front,代碼行數:3,代碼來源:noticeUtils.ts

示例10:

 .subscribe(() => {
   toastr.success('Successfully updated.');
 }, this.handleError);
開發者ID:Angular-Reference,項目名稱:angular2-app,代碼行數:3,代碼來源:user-edit.component.ts


注:本文中的toastr.success函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。