本文整理汇总了TypeScript中@ionic/angular.ActionSheetController类的典型用法代码示例。如果您正苦于以下问题:TypeScript ActionSheetController类的具体用法?TypeScript ActionSheetController怎么用?TypeScript ActionSheetController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ActionSheetController类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Mostrat_op
async Mostrat_op() {
const hojaDeAccion = await this.AsheeCtrl.create({
header: 'opciones',
buttons:
[
{
text: 'Muy buena',
icon: 'happy',
handler: () => {
this.mostrar_calificacion_buena();
}
}, {
text: 'Falta Mejorar',
icon: 'sad',
handler: () => {
this.mostrar_calificacion_mala();
}
}
]
});
hojaDeAccion.present();
}
示例2: presentActionSheet
async presentActionSheet() {
const actionSheet = await this.actionSheetCtrl.create({
header: 'Albums',
backdropDismiss: false,
buttons: [{
text: 'Delete',
role: 'destructive',
icon: 'trash',
cssClass: 'rojo',
handler: () => {
console.log('Delete clicked');
}
}, {
text: 'Share',
icon: 'share',
handler: () => {
console.log('Share clicked');
}
}, {
text: 'Play (open modal)',
icon: 'arrow-dropright-circle',
handler: () => {
console.log('Play clicked');
}
}, {
text: 'Favorite',
icon: 'heart',
handler: () => {
console.log('Favorite clicked');
}
}, {
text: 'Cancel',
icon: 'close',
role: 'cancel',
handler: () => {
console.log('Cancel clicked');
}
}]
});
await actionSheet.present();
}
示例3: clickMe
async clickMe() {
const actionSheet = await this.actionSheetController.create({
header: 'Albums',
buttons: [{
text: 'Delete',
role: 'destructive',
icon: 'trash',
handler: () => {
console.log('Delete clicked');
}
}, {
text: 'Share',
icon: 'share',
handler: () => {
console.log('Share clicked');
}
}, {
text: 'Play (open modal)',
icon: 'arrow-dropright-circle',
handler: () => {
console.log('Play clicked');
}
}, {
text: 'Favorite',
icon: 'heart',
handler: () => {
console.log('Favorite clicked');
}
}, {
text: 'Cancel',
role: 'cancel',
icon: 'close',
handler: () => {
console.log('Cancel clicked');
}
}]
});
return actionSheet.present();
}