跳到主要内容

bn.showActionSheet

showActionSheet(options): Promise<ActionSheetResult>

description Displays an action sheet.

example

 bn.showActionSheet({
itemList: ['A', 'B', 'C'],
success (res) {
console.log(res.tapIndex)
},
fail (res) {
console.log(res.errMsg)
}
})

Parameters

NameType
optionsActionSheetOptions

Returns

Promise<ActionSheetResult>

ActionSheetOptions

Ƭ ActionSheetOptions: Object

Type declaration

NameTypeDescription
alertText?stringAlert text
itemListstring[]The text array of the button, with a length limited to 6
itemColor?stringThe text color of the button

ActionSheetResult

Ƭ ActionSheetResult: Object

Type declaration

NameTypeDescription
tapIndexnumberThe sequence number of the button tapped by the user, from top to bottom and starting from 0