ion-tab
选项卡组件是 tabs 的子组件。每个选项卡都可以包含应用或单个视图的顶层导航堆栈。一个应用可以有许多选项卡,所有选项卡都有自己独立的导航。
¥The tab component is a child component of tabs. Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.
注意:该组件只能与普通 JavaScript 项目一起使用。对于 Angular、React 和 Vue 应用,你不需要使用 ion-tab
来声明选项卡组件。
¥Note: This component should only be used with vanilla JavaScript projects. For Angular, React, and Vue apps you do not need to use ion-tab
to declare your tab components.
有关配置选项卡的更多详细信息,请参阅 选项卡文档。
¥See the tabs documentation for more details on configuring tabs.
属性
¥Properties
component
Description | The component to display inside of the tab. |
Attribute | component |
Type | Function | HTMLElement | null | string | undefined |
Default | undefined |
tab
Description | A tab id must be provided for each ion-tab . It's used internally to reference the selected tab or by the router to switch between them. |
Attribute | tab |
Type | string |
Default | undefined |
事件
¥Events
No events available for this component.
方法
¥Methods
setActive
Description | Set the active component for the tab |
Signature | setActive() => Promise<void> |
CSS 阴影部分
¥CSS Shadow Parts
No CSS shadow parts available for this component.
CSS 自定义属性
¥CSS Custom Properties
No CSS custom properties available for this component.
插槽
¥Slots
No slots available for this component.