harmony 鸿蒙tab-bar

  • 2022-08-09
  • 浏览 (743)

tab-bar

NOTE

This component is supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version.

<tab-bar> is a child component of <tabs> and is used to provide the area to display tab labels. Its child components are horizontally arranged.

Required Permissions

None

Child Components

Supported

Attributes

In addition to the universal attributes, the following attributes are supported.

Name Type Default Value Mandatory Description
mode string scrollable No Extensibility of the component width. Available values are as follows:
- scrollable: The width of a child component is the configured width. When the total width of all child components (including the margins) is greater than the tab-bar width, the child components can scroll horizontally.
- fixed: The width of a child component equals the tab-bar width divided by the number of child components.

Styles

The universal styles are supported.

Events

The universal events are supported.

Methods

The universal methods are supported.

Example

For details, see Example in tabs.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙JavaScript-compatible Web-like Development Paradigm

harmony 鸿蒙Data Type Attributes

harmony 鸿蒙button

harmony 鸿蒙chart

harmony 鸿蒙divider

harmony 鸿蒙image-animator

harmony 鸿蒙image

harmony 鸿蒙input

harmony 鸿蒙label

harmony 鸿蒙marquee

0  赞