跳到主要内容
版本:v7

ion-tab

shadow

tab 组件是 tabs 的子组件。每个 tab 可以包含应用的一个顶级导航栈或单个视图。一个应用可以有多个 tabs,每个 tab 都有自己独立的导航。

备注

注意:该组件仅适用于原生 JavaScript 项目。对于 Angular、React 和 Vue 应用,你不需要使用 ion-tab 来声明你的 tab 组件。

有关 tabs 配置的更多详细信息,请参阅 tabs 文档

属性

component

DescriptionThe component to display inside of the tab.
Attributecomponent
TypeFunction | HTMLElement | null | string | undefined
Defaultundefined

tab

DescriptionA 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.
Attributetab
Typestring
Defaultundefined

事件

No events available for this component.

方法

setActive

DescriptionSet the active component for the tab
SignaturesetActive() => 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.