Skip to content

Tabs

Divide data collections which are related yet belong to different types.

Basic usage

Basic usage of tab.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Icon tab

Tab page with icons.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Position

The position of the tab bar can be customized through the position property.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Types

The type of label can be set by type.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Lazy load

By setting the lazy-load property, the panel can be rendered when it is first activated.

Content of Tab Panel 1

Extra

The extra display content can be customized through the extra slot.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Editable

By setting editable is true, you can turn on the dynamic increase and decrease tabs

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3
Content of Tab Panel 4

Trigger

Specify the trigger method by trigger.

Content of Tab Panel 1
Content of Tab Panel 2
Content of Tab Panel 3

Tabs API

Tabs Attributes

NameDescriptionTypeDefault
active-key/v-modelThe key of the currently selected labelString Number-
default-active-keyThe key of the tab selected by default (uncontrolled state, select the first tab page when it is empty)String Number-
positionPosition of the tabStringtop
typeThe type of tabStringdefault
directionThe direction of tabStringhorizontal
editableWhether to enable editable modeBooleanfalse
show-add-buttonWhether to display the add button (only available in editable mode)Booleanfalse
destroy-on-hideWhether to destroy the content when the label is not displayedBooleanfalse
lazy-loadWhether to mount the content when the label is first displayedBooleanfalse
justifyThe height of the container is fully supported, and it only takes effect in horizontal mode.Booleanfalse
animationWhether to enable option content transition animationBooleanfalse
header-paddingWhether there is a horizontal margin on the header of the tab.Booleantrue
auto-switchWhether to switch to a new tab after creating a tab (the last one)Booleanfalse
hide-contentWhether to hide contentBooleanfalse
triggerTrigger methodStringclick

Tabs Events

NameDescriptionType
changeTriggered when the current tag value changesFunction
tab-clickTriggered when the user clicks on the tabFunction
addTriggered when the user clicks the add button-
deleteTriggered when the user clicks the delete buttonFunction

Tabs Slots

NameDescription
extraAdditional tab content

Tab-Pane API

Tab-Pane Attributes

NameDescriptionTypeDefault
titleTitle of the tabString-
disabledWhether to disableBooleanfalse
closableWhether to allow this tab to be closed (only effective in editable mode)Booleantrue
destroy-on-hideWhether to destroy the content when the label is not displayedBooleanfalse

Tab-Pane Slots

NameDescription
titleTab title