我正在尝试在底部工作表中添加列表,但是 ionic 给了我们一个数组,因此我们可以在那里添加类并为其设置样式。我想问的是我们如何制作一个列表或完全我们自己的 html 代码并将其传递给将显示的底部工作表函数?
async presentActionSheet() {
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',
icon: 'close',
role: 'cancel',
handler: …Run Code Online (Sandbox Code Playgroud)