跳到主要内容

bn.onTabSwitched

onTabSwitched(cb): void

description listen tab item switch event

example

bn.onTabSwitched((params) => {
console.log('tab swtiched: ', params);
});

Parameters

NameType
cbTabSwtichedCallback

Returns

void


TabSwtichedCallback

Ƭ TabSwtichedCallback: (data: TabSwitchedEventData) => void | Promise<void>

Type declaration

▸ (data): void | Promise<void>

Parameters

NameType
dataTabSwitchedEventData

Returns

void | Promise<void>


TabSwitchedEventData

Ƭ TabSwitchedEventData: Object

Type declaration

NameTypeDescription
type"api" | "tap"Action Types: - api: triggered by an bn.switchTab call. - tap: triggered by a manual click.
pagePathstring-
querystring-