开发 API 界面 TabBar ks.setTabBarStyle
# ks.setTabBarStyle
更新时间:2024-09-18 14:46:40
动态设置 tabBar 的整体样式。
# setTabBarStyle(options: SetTabBarStyleOptions): Promise<void>
# 参数
| 参数 | 类型 | 必填 |
|---|---|---|
| options | SetTabBarStyleOptions | 是 |
# SetTabBarStyleOptions
属性
| 属性 | 类型 | 必填 | 说明 |
|---|---|---|---|
| color | string | 否 | tab 上的文字默认颜色,HexColor |
| selectedColor | string | 否 | tab 上的文字选中时的颜色,HexColor |
| backgroundColor | string | 否 | tab 的背景色,HexColor |
| borderStyle | 'black' | 'white' | 否 | tabBar 上边框的颜色, 仅支持 black/white |
| selectedShowBold | boolean | 否 | tabBar选中时候文字是否加粗,默认加粗 |
| success | (result: void) => void | 否 | 接口调用成功的回调函数 |
| fail | (error: APIError) => void | 否 | 接口调用失败的回调函数 |
| complete | (resultOrError: void | APIError) => void | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
# 返回值
# Promise<void>
# 示例代码
上一篇:《ks.setTabBarItem》
下一篇:《ks.showTabBar》
仍有疑问? 前往社区提问