当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ionic-angular.ActionSheetController类代码示例

本文整理汇总了TypeScript中ionic-angular.ActionSheetController的典型用法代码示例。如果您正苦于以下问题:TypeScript ActionSheetController类的具体用法?TypeScript ActionSheetController怎么用?TypeScript ActionSheetController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ActionSheetController类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: startNewGame

 startNewGame() {
   if(!this.setupData.playerOne || this.setupData.playerOne === "" || !this.setupData.playerTwo || this.setupData.playerTwo === "") {
     let actionsheet = this.actionsheet.create({
       title: 'You didn\'t specify both player\'s usernames. Their names will be \'Player One\' and \'Player Two\'. Is that okay?',
       cssClass: 'setup-actionsheet',
       buttons: [
         {
           text: 'No, I\'ll specify their names.',
           icon: 'md-alert',
           role: 'cancel'
         },
         {
           text: 'Yes, that\'s fine.',
           icon: 'md-checkmark-circle',
           role: 'destructive',
           handler: () => {
             this.setupData.playerOne = "Player One";
             this.setupData.playerTwo = "Player Two";
             this.newGame(this.setupData);
           }
         }
       ]
     });
     actionsheet.present();
   } else {
     this.newGame(this.setupData);
   }
 }
开发者ID:rraaij,项目名称:keepstraight,代码行数:28,代码来源:setup.ts

示例2: options

  private options(songUrl: string, userUrl: string): void {

    let actions = this.actionCtrl.create({
      title: "Actions",
      buttons: [
        {
          text: "Visit on SoundCloud",
          icon: "link",
          handler: () => {
            window.open(songUrl);
          }
        },
        {
          text: "See who posted",
          icon: "person",
          handler: () => {
            window.open(userUrl);
          }
        },
        {
          text: 'Cancel',
          role: 'cancel',
          icon: "close",
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });

    actions.present();
  }
开发者ID:jgw96,项目名称:Soundel,代码行数:32,代码来源:home.ts

示例3: abrirActionSheet

  abrirActionSheet() {
    let actionSheet = this.actionSheetCtrl.create(
      {
        title: 'Opções',
        buttons: [
          {
            icon: 'md-create',
            text: 'Opcão A',
            role: 'destructive',
            handler: () => {

            }
          },
          {
            text: 'Opcão B',
            handler: () => {

            }
          },
          {
            icon: 'md-exit',
            text: 'Cancelar',
            role: 'destructive',
            handler: () => {

            }
          }
        ]
      }
    );
    actionSheet.present();
  }
开发者ID:hlandim,项目名称:Ionic3,代码行数:32,代码来源:action-sheet.ts

示例4: share

    share(concert) {
        let actionSheet: ActionSheet = this.actionSheetCtrl.create({
            title: 'Share via',
            buttons: [
                {
                    text: 'Twitter',
                    handler: () => console.log('share via twitter')
                },
                {
                    text: 'Facebook',
                    handler: () => console.log('share via facebook')
                },
                {
                    text: 'Email',
                    handler: () => console.log('share via email')
                },
                {
                    text: 'Cancel',
                    role: 'cancel',
                    handler: () => console.log('cancel share')
                }
            ]
        });

        actionSheet.present();
    }
开发者ID:cybriz,项目名称:ionic-projects,代码行数:26,代码来源:favourite-detail.ts

示例5: openContact

  openContact(speaker: SpeakerModel) {
    let mode = this.config.get('mode');

    let actionSheet = this.actionSheetCtrl.create({
      title: 'Contact with ' + speaker.name,
      buttons: [
        {
          text: `Email ( ${speaker.email} )`,
          icon: mode !== 'ios' ? 'mail' : null,
          handler: () => {
            window.open('mailto:' + speaker.email);
          }
        },
        {
          text: `Call ( ${speaker.phone} )`,
          icon: mode !== 'ios' ? 'call' : null,
          handler: () => {
            window.open('tel:' + speaker.phone);
          }
        }
      ]
    });

    actionSheet.present();
  }
开发者ID:ddellamico,项目名称:ionic-conference-app,代码行数:25,代码来源:speaker-list.ts

示例6: openSpeakerShare

  openSpeakerShare(speaker: SpeakerModel) {
    const actionSheet = this.actionSheetCtrl.create({
      title: `Share ${speaker.name}`,
      buttons: [
        {
          text: 'Copy Link',
          handler: () => {
            console.log(`Copy link clicked on https://twitter.com/${speaker.twitter}`);
            if (window['cordova'] && window['cordova'].plugins.clipboard) {
              window['cordova'].plugins.clipboard.copy(`https://twitter.com/${speaker.twitter}`);
            }
          }
        },
        {
          text: 'Share via ...',
          handler: () => {
            console.log('Share via clicked');
          }
        },
        {
          text: 'Cancel',
          role: 'cancel',
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });

    actionSheet.present();
  }
开发者ID:ddellamico,项目名称:ionic-conference-app,代码行数:31,代码来源:speaker-list.ts

示例7: showAccountSelector

  private showAccountSelector() {
    let options:any[] = [];

    _.forEach(this.accounts, (account: any) => {
      options.push(
        {
          text: (account.givenName || account.familyName) + ' (' + account.email + ')',
          handler: () => {
            this.onAccountSelect(account);
          }
        }
      );
    });

    // Cancel
    options.push(
      {
        text: this.translate.instant('Cancel'),
        role: 'cancel',
        handler: () => {
          this.navCtrl.pop();
        }
      }
    );

    let actionSheet = this.actionSheetCtrl.create({
      title: this.translate.instant('From BitPay account'),
      buttons: options
    });
    actionSheet.present();
  }
开发者ID:bitjson,项目名称:copay,代码行数:31,代码来源:bitpay-card-intro.ts

示例8: showActionSheet

  showActionSheet()
  {
    let actionSheet = this.actionSheetCtrl.create({
      title: this.cpInfo.name,
      buttons: [{
        text: 'Credit Reviews',
        handler: ()=>{
          let navTransition = actionSheet.dismiss();

          //mock data
          let documents = [{"docName": "appraisal_sample1.docx", "docUrl": "www/mock/appraisal_sample1.docx"},
                          {"docName": "appraisal_sample2.pdf", "docUrl": "www/mock/appraisal_sample2.pdf"},
                          {"docName": "appraisal_sample3.xlsx", "docUrl": "www/mock/appraisal_sample3.xlsx"}];

          navTransition.then(()=>{
            //open the list of documents for the cp
            this.navCtrl.push(CounterpartyCaPage,
                { "counterpartyName": this.cpInfo.name, "documents": documents });
          });

          return false;
        }
      },{
        text: 'Cancel',
        role: 'cancel',
        handler: ()=>{
          ;
        }
      }]
    })

    actionSheet.present();
  }
开发者ID:letuthanhson,项目名称:ionic,代码行数:33,代码来源:counterparty-info.ts

示例9: presentActionSheet

 presentActionSheet():void {
   let actionSheet = this.actionSheetCtrl.create({
     title: '',
     buttons: [
       {
         text: 'Get secured content',
         role: 'destructive',
         handler: () => {
           this.users.getSecuredData().subscribe(response => {
             console.log(response);
           })
         }
       },
       {
         text: 'Log out',
         handler: () => {
           localStorage.setItem('id_token', '');
           this.nav.push(LoginPage);
         }
       },
       {
         text: 'Cancel',
         role: 'cancel',
         handler: () => {
           console.log('Cancel clicked');
         }
       }
     ]
   });
   actionSheet.present();
 }
开发者ID:irenecamunag,项目名称:ionic2-jwt-auth-example,代码行数:31,代码来源:home.ts

示例10: connectPolicy

  connectPolicy(){
    let actionSheet = this.actionSheetCtrl.create({
      title: 'Connect Policy Options',
      buttons: [
        {
          text: 'Connect To Last Device',
          handler: () => {
            console.log('Connect To Last Deviceclicked');
          }
        },
        {
          text: 'Connect To List',
          handler: () => {
            console.log('Connect To List clicked');
          }
        },
       
        {
          text: 'Cancel',
          role: 'cancel',
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });
 
    actionSheet.present();

  }
开发者ID:amitpmloginworks,项目名称:HomeSpotUpdated,代码行数:30,代码来源:advanced.ts


注:本文中的ionic-angular.ActionSheetController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。