调用
每一个sheet中的action对应其点击事件
Button('列表选择弹窗')
.onClick(() => {
ActionSheet.show({
title: '列表选择弹窗标题',
message: '内容',
autoCancel: true,
confirm: {
value: '确认',
action: () => {
console.log('Get Alert Dialog handled')
}
},
cancel: () => {
console.log('actionSheet canceled')
},
alignment: DialogAlignment.Bottom,
offset: { dx: 0, dy: -10 },
sheets: [
{
title: 'apples',
action: () => {
console.log('apples')
}
},
{
title: 'bananas',
action: () => {
console.log('bananas')
}
},
{
title: 'pears',
action: () => {
console.log('pears')
}
}
]
})
})