Skip to content

Tab

Tab component

Basic Usage

Combine er-tab with er-tab-panel, and you'll get a tabs component. You can set the current active by v-model property . You also can change the size or type by set the property.

1
2
3
4

Different size

To change the display size to small large, you can set the size property. The default size is default.

1
2
3
4
Current: default

Different Position

1
2
3
4
Current: top

Different type

You can set the type card border-card to change the showMode

1
2
3
4
Current: default

Tabs API

Tabs Attributes

NameDescriptionTypeDefault
v-modelSet the active Tabstring | number-
sizeSet the size'large' | 'small' | 'default'default
typeSet the show Mode'card' | 'border-card'-
tabPositionSet the tabs direction'left' | 'right' | 'top' | 'bottom'top

Tabs Event

NameDescriptionParameters
tab-clicktrigger it when click the tabitem: Children, index: number

TabsPanel Attributes

NameDescriptionTypeDefault
labelSet show tab titlestring-
nameSet the unqiue value of the tabstring-

Released under the MIT License.