Skip to main content

bn.setTabBarItem

setTabBarItem(options): Promise<{}>

description Dynamically set the content of a tabBar item

example

 bn.setTabBarItem({   index: 0,   text: 'text',   iconPath: '/path/to/iconPath',   selectedIconPath: '/path/to/selectedIconPath' })

Parameters

NameType
optionsTabBarItemOptions

Returns

Promise<{}>


TabBarItemOptions#

Ƭ TabBarItemOptions: Object

Type declaration

NameTypeDescription
indexnumberWhich item of the tabBar, counting from the left
text?stringbutton text on tab
iconPath?stringImage path, icon size is limited to 40kb, recommended size is 81px * 81px, when position is top, this parameter is invalid
selectedIconPath?stringThe image path when selected, the icon size is limited to 40kb, the recommended size is 81px * 81px, when the position is top, this parameter is invalid