跳到主要内容
版本:v7

ion-tab-bar

shadow

标签栏(Tab bar)是一个 UI 组件,包含一组标签按钮(tab button)。标签栏必须在tabs(标签页)内部提供,以便与每个标签(tab)进行通信。

用法

<ion-tabs>
<!-- 标签栏 -->
<ion-tab-bar slot="bottom">
<ion-tab-button tab="account">
<ion-icon name="person"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="contact">
<ion-icon name="call"></ion-icon>
</ion-tab-button>
<ion-tab-button tab="settings">
<ion-icon name="settings"></ion-icon>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>

属性

color

说明The color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
属性color
类型"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
默认值undefined

mode

说明The mode determines which platform styles to use.

这是一个虚拟属性,在初始化时设置一次,之后更改其值不会更新组件。
属性mode
类型"ios" | "md"
默认值undefined

selectedTab

说明The selected tab component
属性selected-tab
类型string | undefined
默认值undefined

translucent

说明If true, the tab bar will be translucent. Only applies when the mode is "ios" and the device supports backdrop-filter.
属性translucent
类型boolean
默认值false

事件

该组件没有可用的事件。

方法

该组件没有可用的公共方法。

CSS 阴影部分

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

CSS 自定义属性

Name说明
--backgroundBackground of the tab bar
--borderBorder of the tab bar
--colorColor of the tab bar

插槽

该组件没有可用的插槽。