默认标签,即标签的初始页面设置正确,但不呈现UI,单击任一标签后,它将呈现所选标签的相应UI
import {Tab, Tabs,} from 'native-base';
<Tabs
initialPage={0}
page={this.state.activeTab}
tabContainerStyle={commonStyle.tabContainerStyle}
onChangeTab={({ i, from }) => this.onChangeTabHandler(i, from)}
tabBarUnderlineStyle={commonStyle.tabBarUnderlineStyle}
locked={true}
>
<Tab activeTextStyle={commonStyle.activeTextStyle} textStyle={commonStyle.textStyle} heading="ADD">
</Tab>
<Tab activeTextStyle={commonStyle.activeTextStyle} textStyle={commonStyle.textStyle} heading="VIEW">
</Tab>
</Tabs>
默认标签不起作用