harmony 鸿蒙tab-content

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

tab-content

NOTE

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

is a child component of and is used to provide the area for displaying the tab content. By default, its height is such that all the remaining space of the component is filled. The child components are arranged horizontally. When is used as a child element in a container, its length along the main axis must be specified. Otherwise, it cannot be displayed. <tab-content> does not support page scrolling. If page scrolling is required, consider nesting a list.

Required Permissions

None

Child Components

Supported

Attributes

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

Name Type Mandatory Description
scrollable boolean No Whether the tabs can be switched by swiping left or right. The default value is true. If this attribute is set to false, tab switching is implemented only through the association with tab-bar.

Styles

The universal styles are supported.

Events

The universal events 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  赞