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


TypeScript ActionSheet.create方法代碼示例

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


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

示例1: showSheet

 public showSheet(title: string, body: string): void {
   let sheet = ActionSheet.create({
     title: "Actions",
     buttons: [
       {
         text: 'Share',
         icon: "share",
         handler: () => {
           SocialSharing.share(body, title);
         }
       }, {
         text: 'Calendar',
         icon: "calendar",
         handler: () => {
           Calendar.createEventInteractively(title, null, body, new Date(), new Date()).then(() => {
             console.log("event made");
           }).catch((err) => {
             console.log(err);
           })
         }
       }, {
         text: 'Cancel',
         role: 'cancel',
         icon: "close",
         handler: () => {
           console.log('Cancel clicked');
         }
       }
     ]
   })
   
   this.nav.present(sheet);
 }
開發者ID:jgw96,項目名稱:NoteAwesome,代碼行數:33,代碼來源:getting-started.ts

示例2: openAS

	openAS() {
		let actionSheet = ActionSheet.create({
			title: 'Goals',
			cssClass: 'action-sheets-goals-page',
			buttons: [
				{
					text: 'Delete',
					role: 'destructive',
					handler: () => {
						console.log('Delete clicked');
					}
				}, {
					text: 'Add',
					handler: () => {
						console.log('Archive clicked');
						this.openPage(AddGoalsPage);
					}
				}, {
					text: 'Cancel',
					role: 'cancel',
					handler: () => {
						console.log('Cancel clicked');
					}
				}
			]
		});
		this.nav.present(actionSheet);
	}
開發者ID:chrishan8,項目名稱:cashflow-ionic,代碼行數:28,代碼來源:goals-page.ts

示例3:

 this.pressGesture.on('press', e => {
   let actionSheet = ActionSheet.create({
     title: 'Modify your album',
     buttons: [
       {
         text: 'Delete',
         role: 'destructive',
         icon: 'trash',
         handler: () => {
           // console.log(this.el.textContent.trim());
           console.log(this.obj);
           console.log(Games.find({ _id: this.obj }).fetch());
           // console.log(Lists.find({ _id: this.obj }).length>0);
           if (Games.find({ _id: this.obj }).fetch().length > 0)
             console.log(Games.remove({ _id: this.obj }));
           // else if (ShoppingLists.find({ _id: this.obj }).fetch().length > 0)
           //   console.log(ShoppingLists.remove({ _id: this.obj }));
         }
       }, {
         text: 'Cancel',
         role: 'cancel',
         cssClass: 'redd',
         handler: () => {
           console.log('Cancel clicked');
         }
       }
     ],
   });
   this.nav.present(actionSheet);
 })
開發者ID:ShaharLahav,項目名稱:Betting-game-admin,代碼行數:30,代碼來源:long-press.ts

示例4: feedback

 feedback() {
     let feedback = ActionSheet.create({
         title: 'Your Feedback',
         buttons: [
             {
                 text: 'Send us an Email',
                 icon: 'mail',
                 handler: ()=> {
                     EmailComposer.isAvailable().then((available) => {
                         let email = {
                             to: 'hello@ralphowino.com',
                             isHtml: true
                         };
                         if (available) {
                             EmailComposer.open(email);
                         }
                     });
                 }
             },
             {
                 text: 'Send an Issue',
                 icon: 'github',
                 handler: ()=> {
                     let url = 'https://github.com/angular-ui/ui-router/wiki';
                     InAppBrowser.open(url, '_blank');
                 }
             }]
     });
     this.nav.present(feedback);
 }
開發者ID:ralphowino,項目名稱:ionic-native-kitchen-sink,代碼行數:30,代碼來源:home.ts

示例5: openAppSettings

  openAppSettings(app) {
    let actionSheet = ActionSheet.create({
      title: 'Share ' + app.name,
      buttons: [
        {
          text: 'Copy Link',
          handler: () => {
            console.log("Copy link clicked on https://twitter.com/" + app.twitter);
            if (window['cordova'] && window['cordova'].plugins.clipboard) {
              window['cordova'].plugins.clipboard.copy("https://twitter.com/" + app.twitter);
            }
          }
        },
        {
          text: 'Share via ...',
          handler: () => {
            console.log("Share via clicked");
          }
        },
        {
          text: 'Cancel',
          role: 'cancel',
          handler: () => {
            console.log("Cancel clicked");
          }
        }
      ]
    });

    this.nav.present(actionSheet);
  }
開發者ID:lpikora,項目名稱:ionic-debug-console-backend-ui,代碼行數:31,代碼來源:apps-list.ts

示例6: openMenu

 openMenu() {
   this.actionSheet = ActionSheet.create({
     title: 'Activity',
     buttons: [
       {
         text: 'Delete',
         role: 'destructive',
         icon: 'trash',
         handler: () => {
           this._activityProvider.removeActivity(
             this.activity,
             this.expandedActivities[this.expandedActivities.length - 1]
           );
         }
       },
       {
         text: 'Cancel',
         role: 'cancel',
         icon: null,
         handler: () => {
           this.actionSheet && this.actionSheet.dismiss();
         }
       }
     ]
   });
   this.nav.present(this.actionSheet);
 }
開發者ID:CompassSoftware,項目名稱:xpsp,代碼行數:27,代碼來源:activity-detail.cmp.ts

示例7: openMenu

  openMenu() {
    let actionSheet = ActionSheet.create({
      title: 'Albums',
      cssClass: 'action-sheets-basic-page',
      buttons: [
        {
          text: 'Tulis Artikel',
          role: 'destructive',
          icon: !this.platform.is('ios') ? 'book' : null,
          handler: () => {
            console.log('Delete clicked');
            this.nav.push(TulisArtikelPage);
          }
        },
        {
          text: 'Tanya / Diskusi',
          icon: !this.platform.is('ios') ? 'people' : null,
          handler: () => {
            console.log('Share clicked');
            this.nav.push(TulisDiskusiPage);
          }
        },
        {
          text: 'Batal',
          role: 'cancel', // will always sort to be on the bottom
          icon: !this.platform.is('ios') ? 'close' : null,
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });

    this.nav.present(actionSheet);
  }
開發者ID:ivanmaulana,項目名稱:mcybex2,代碼行數:35,代碼來源:about.ts

示例8: presentActionSheet

 presentActionSheet() {
   let actionSheet = ActionSheet.create({
     buttons: [
       {
         text: 'Choose Photo',
         handler: () => {
           this.getPicture(0); // 1 == Library
         }
       },
       {
         text: 'Take Photo',
         handler: () => {
           this.getPicture(1); // 1 == Camera
         }
       },
       {
         text: 'Demo Photo',
         handler: () => {
           this.srcImage = 'demo.png';
         }
       },
       {
         text: 'Cancel',
         role: 'cancel'
       }
     ]
   });
   this.nav.present(actionSheet);
 }
開發者ID:Dakuan,項目名稱:ionic-ocr-example,代碼行數:29,代碼來源:home.ts

示例9: showOptions

 showOptions(){
   let action = ActionSheet.create({
     title: 'Options post',
     buttons: [
       {
         text: 'Destructive',
         role: 'destructive',
         handler: () => {
           console.log('Destructive clicked');
         }
       },
       {
         text: 'Archive',
         handler: () => {
           console.log('Archive clicked');
         }
       },
       {
         text: 'Cancel',
         role: 'cancel',
         handler: () => {
           console.log('Cancel clicked');
         }
       }
     ]
   });
   this.navCtrl.present( action );
 }
開發者ID:EscuelaIt,項目名稱:class-10-demo,代碼行數:28,代碼來源:timeline.ts

示例10: openFilters

 openFilters(){
   let sheet = ActionSheet.create({
     title: 'Filter by ...',
     buttons: [
       {
         text: 'Movies only',
         handler: () => {
           this.results = this._unfilteredResults.filter( (item) => item.kind === 'feature-movie' )
           this.usesFilter = true
         }
       },
       {
         text: 'Songs only',
         handler: () => {
           this.results = this._unfilteredResults.filter( (item) => item.kind === 'song' )
           this.usesFilter = true
         }
       },
       {
         text: 'Clear',
         style: 'destructive',
         handler: () => {
           this.results = this._unfilteredResults
           this.usesFilter = false
         }
       },
       {
         text: 'Canel',
         style: 'cancel'
       }
     ]
   })
   this.nav.present(sheet)
 }
開發者ID:igzjuanrafaelperez,項目名稱:iTunesBrowser,代碼行數:34,代碼來源:search.ts


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