ion-tab
tab 组件是 tabs 的子组件。每个 tab 可以包含应用的一个顶级导航栈或单个视图。一个应用可以有多个 tabs,每个 tab 都有自己独立的导航。
备注
注意:该组件仅适用于原生 JavaScript 项目。对于 Angular、React 和 Vue 应用,你不需要使用 ion-tab 来声明你的 tab 组件。
有关 tabs 配置的更多详细信息,请参阅 tabs 文档。
属性
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 |
事件
No events available for this component.
方法
setActive
| Description | Set the active component for the tab |
| Signature | setActive() => Promise<void> |
CSS Shadow Parts
No CSS shadow parts available for this component.
CSS 自定义属性
No CSS custom properties available for this component.
插槽
No slots available for this component.