0.4.0 • Published 7 years ago

u-tabs.vue v0.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Tabs

Examples

Basic

<u-tabs>
    <u-tab title="TabA">ContentA</u-tab>
    <u-tab title="TabB">ContentB</u-tab>
    <u-tab title="TabC">ContentC</u-tab>
</u-tabs>

Index

<u-tabs :index="2">
    <u-tab title="TabA">ContentA</u-tab>
    <u-tab title="TabB">ContentB</u-tab>
    <u-tab title="TabC">ContentC</u-tab>
</u-tabs>

Readonly & Disabled

<u-tabs readonly>
    <u-tab title="TabA">Readonly</u-tab>
    <u-tab title="TabB">Readonly</u-tab>
    <u-tab title="TabC">Readonly</u-tab>
</u-tabs>
<u-tabs disabled>
    <u-tab title="TabA">Disabled All</u-tab>
    <u-tab title="TabB">Disabled All</u-tab>
    <u-tab title="TabC">Disabled All</u-tab>
</u-tabs>
<u-tabs>
    <u-tab title="TabA">Disabled Partially</u-tab>
    <u-tab title="TabB" disabled>Disabled Partially</u-tab>
    <u-tab title="TabC">Disabled Partially</u-tab>
</u-tabs>

Hidden

<u-tabs :index="2">
    <u-tab title="TabA">ContentA</u-tab>
    <u-tab title="TabB" hidden>ContentB</u-tab>
    <u-tab title="TabC">ContentC</u-tab>
</u-tabs>

Tabs API

Attrs/Props

NameTypeDefaultDescription
index.syncNumber0Index of selected tab
readonlyBooleanfalseReadonly
disabledBooleanfalseDisabled
routerBooleanfalseUse vue router to activate

Slots

NameDescription
(default)

Events

@select

Emit when selecting a tab.

PropertyTypeDescription
indexNumberIndex of selected tab
$TabTabThe selected tab

@input

Emit after selecting a tab.

PropertyTypeDescription
indexNumberIndex of selected tab

Tab API

Attrs/Props

Attr/PropTypeDefaultDescription
titleStringTab title
hiddenBooleanfalseHide this tab
disabledBooleanfalseDisabled
toString | ObjectThe target location of this link
replaceBooleanfalseSetting replace prop will call router.replace() instead of router.push() when clicked
exactBooleanfalseActive matching behavior is inclusive match

Slots

SlotDescription
(default)

Events

@navigate

Emit when navigating to other router.

PropertyTypeDescription
toObjectThe target location of this link
replaceBooleanSetting replace prop will call router.replace() instead of router.push() when clicked
exactBooleanActive matching behavior is inclusive match
0.4.0

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago