跳到主要内容
版本:v6

ion-tab

shadow

标签(Tab)组件是tabs(标签页)的子组件。每个标签可以包含应用的顶层导航堆栈或单个视图。一个应用可以有多个标签,每个标签都有自己的独立导航。

备注

注意:此组件仅应与 vanilla JavaScript 项目一起使用。对于 Angular、React 和 Vue 应用,你不需要使用 ion-tab 来声明标签组件。

请参阅tabs 文档了解更多关于配置标签的详细信息。

属性​

component​

说明The component to display inside of the tab.
属性component
类型Function | HTMLElement | null | string | undefined
默认值undefined

tab​

说明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.
属性tab
类型string
默认值undefined

事件​

该组件没有可用的事件。

方法​

setActive​

说明Set the active component for the tab
签名setActive() => Promise<void>

CSS 阴影部分​

该组件没有可用的 CSS 阴影部分。

CSS 自定义属性​

该组件没有可用的 CSS 自定义属性。

插槽​

该组件没有可用的插槽。