mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
10 lines
318 B
TypeScript
10 lines
318 B
TypeScript
import { EventData, Page, BottomNavigation } from '@nativescript/core';
|
|
|
|
export const selectTab = (args: EventData) => {
|
|
const page = <Page>(<any>args.object).page;
|
|
const bottomNav = <BottomNavigation>page.getViewById('bottomNavigation');
|
|
|
|
const index = (<any>args.object).tag;
|
|
bottomNav.selectedIndex = index;
|
|
};
|