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


TypeScript DialogService.open方法代碼示例

本文整理匯總了TypeScript中aurelia-dialog.DialogService.open方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DialogService.open方法的具體用法?TypeScript DialogService.open怎麽用?TypeScript DialogService.open使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在aurelia-dialog.DialogService的用法示例。


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

示例1: deleteModal

 deleteModal(user) {
     (this.dialogService).open({ viewModel: DeleteDialog, model: user }).then(response => {
         if (!response.wasCancelled) {
             this.deleteModal2(user)
         }
     });
 }
開發者ID:atul221282,項目名稱:AureliaTSApp,代碼行數:7,代碼來源:login.ts

示例2: new

    new() {
        this.dialogService.open({ viewModel: EditJobPhase})
            .whenClosed(result => {
                if(result.wasCancelled) return;

                Notifications.success('Job Phase saved successfully');
                this.refresh();
            })
            .catch(Notifications.error);
    }
開發者ID:Resounding,項目名稱:Jobs-Web,代碼行數:10,代碼來源:list.ts

示例3: removeAssignie

 removeAssignie(userName: any)
 {
     this.dlg.open({ viewModel: Confirm, model: 'Do you want to remove this user as asignee: ' + userName })
         .whenClosed(response =>
         {
             console.log(response);
             if (!response.wasCancelled) {
                 let index = this.assigniees.findIndex(element => element === userName);
                 this.assigniees.splice(index, 1);
             }
         });
 }
開發者ID:yordan-milkov,項目名稱:TaskBo-rd,代碼行數:12,代碼來源:editTask.ts

示例4: removeCheck

 removeCheck(checkData: any)
 {
     this.dlg.open({ viewModel: Confirm, model: 'Do you want to delete this check box:' + checkData.name })
         .whenClosed(response =>
         {
             if (!response.wasCancelled) {
                 let index = this.checkboxes.findIndex(element => element.checkUID === checkData.checkUID);
                 this.checkboxes.splice(index, 1);
                 this.connect.deleteCheck(checkData.checkUID);
             }
         });
 }
開發者ID:yordan-milkov,項目名稱:TaskBo-rd,代碼行數:12,代碼來源:editTask.ts

示例5: edit

    edit(phase:JobPhase) {
        this.dialogService.open({ viewModel: EditJobPhase, model: phase })
            .whenClosed(result => {
                if(result.wasCancelled) return;

                const message = result.output ? 'Phase saved successfully' : 'Phase deleted successfully';
                Notifications.success(message);

                this.refresh();
            })
            .catch(Notifications.error);
    }
開發者ID:Resounding,項目名稱:Jobs-Web,代碼行數:12,代碼來源:list.ts

示例6: judge

    judge(report:Report) {
        this.dialogService.open({viewModel: ReportJudge, model: report}).then(response => {
            if (!response.wasCancelled) {
                const data = response.output;
                this.reportService.judgeReport(report.id, data.status.text, data.date)
                    .then(result => {
                        this.reports = this.reports.map(current => current.id == report.id ? result : current);
                    }, error => alert(error));

            }
        })
    }
開發者ID:m4riusz,項目名稱:Twitter,代碼行數:12,代碼來源:court.ts

示例7: removeUser

 removeUser(userName: any)
 {
     this.dlg.open({ viewModel: Confirm, model: 'Do you want to remove this user from the group: ' + userName.name })
         .whenClosed(response =>
         {
             if (!response.wasCancelled) {
                 let index = this.groupUsers.findIndex(element => element === userName);
                 let key = this.groupUsers[index].UID;
                 if ( this.modifyUsers.get( key ) === 1 )
                 {
                     this.modifyUsers.set( key, 2 );
                 }
                 else
                 {
                     this.modifyUsers.set( key, 0 );
                 }
                 this.groupUsers.splice(index, 1);
             }
         });
 }
開發者ID:yordan-milkov,項目名稱:TaskBo-rd,代碼行數:20,代碼來源:addEditGroup.ts

示例8: alert

 this.checkServer(env.fhir.server_url).then(valid => {
   if (valid) {
     this.fhir.init(env.fhir.server_url);
   } else {
     this.dialog
       .open({
         model: { url: env.fhir ? env.fhir.server_url || "" : "" },
         viewModel: SelectServer
       })
       .whenClosed(async response => {
         if (response.wasCancelled) {
           alert("Keine Server Verbindung");
           delete env.fhir.server_url;
           return;
         } else {
           env.fhir.server_url = response.output;
           this.login();
         }
       });
   }
 });
開發者ID:rgwch,項目名稱:webelexis,代碼行數:21,代碼來源:fhir-login.ts

示例9: showMessage

 showMessage(message: string, title : string = 'Message', options = ['Ok']) {
     return this.dialogService.open({ viewModel: MessageBox, model: { message, title, options } });
 }
開發者ID:tibor19,項目名稱:NotesApp,代碼行數:3,代碼來源:common-dialogs.ts

示例10: editConnection

 editConnection(connection) {
     this.dialogService.open({ viewModel: EditConnection, model: connection })
         .then(result => {
             if(result.output) this.saveConnection(result.output)
         });
 }
開發者ID:bfil,項目名稱:exar-db,代碼行數:6,代碼來源:manage-connections.ts


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