本文整理匯總了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();
}