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


TypeScript ActionSheet.present方法代码示例

本文整理汇总了TypeScript中ionic-angular.ActionSheet.present方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ActionSheet.present方法的具体用法?TypeScript ActionSheet.present怎么用?TypeScript ActionSheet.present使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ionic-angular.ActionSheet的用法示例。


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

示例1: 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

示例2: generate

  generate(bank : Bank) {
    const contextMenu = new ContextMenu(bank.name, this.translate);

    //contextMenu.addItem('REORDER', () => this.reoder(bank));
    contextMenu.addItem('REMOVE', () => this.remove(bank));
    contextMenu.addItem('RENAME', () => this.rename(bank));
    //contextMenu.addItem('Copy to local', () => console.log('Cancel clicked'));

    this.instance = contextMenu.generate(this.page.actionSheet);
    this.instance.present();
  }
开发者ID:PedalPi,项目名称:Apk,代码行数:11,代码来源:banks.ts

示例3: presentActionSheet

  private async presentActionSheet(action:string):Promise<void> {
    let buttons:Array<Object> = new Array<Object>();
    let actionSheet:ActionSheet;
    
    let tags:string = await this.configService.getStatusCakeTags();
    
    if(tags != null) {
      // tags is a comma separated string
      let tagArray = tags.split(',');

      for (let tag of tagArray) {
        tag = tag.trim();
        buttons.push(
          {
            text: action.charAt(0).toUpperCase() + action.slice(1) + ' tag ' + tag,
            handler: () => {
              this.doApiAction(action, tag);
            }
          }
        );
      }
    }
    
    buttons.push(
      {
        text: 'Cancel',
        role: 'cancel',
        handler: () => {}
      }
    );

    actionSheet = this.actionSheetCtrl.create({
      title: 'Which tag should be ' + action + 'd?',
      buttons: buttons
    });
    actionSheet.present();
  }
开发者ID:MaxxtonGroup,项目名称:statuscake-app,代码行数:37,代码来源:bulk.component.ts


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