# ks.switchTab

跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面

# switchTab(options: SwitchTabOptions): Promise<void>

# 参数

参数 类型 必填
options SwitchTabOptions

# SwitchTabOptions

属性
属性 类型 必填 说明
url string 目标 tabBar 页面的路径(在 app.json 的 tabBar 字段中定义的页面),路径后不能带参数
success (result: void) => void 接口调用成功的回调函数
fail (error: APIError) => void 接口调用失败的回调函数
complete (resultOrError: void | APIError) => void 接口调用结束的回调函数(调用成功、失败都会执行)

# 返回值

# Promise<void>

Copyright ©2024, All Rights Reserved