Simplified bootstrap tabs
v-model
support to switch tabs programmatically #7
Usage:<vue-tabs v-model="tabName">
<v-tab v-for="(tab, index) in tabs"
:key="tab.name"
:title="tab.name"
icon="ti-user">
{{tab.name}}
</v-tab>
</vue-tabs>
export default{
data(){
return {
tabs: [{name:'name1'},{name:'name2'},{name:'name3'}],
tabName: 'name2'
}
}
}
value
prop (part of v-model) to specify the initial tab that should be open
value: [String, Number, Object]
Vue.use(VueTabs)
is no longer needed if the component is included via script tag. Note that it is still needed when used with npmtitle
slot to customize tabs
Usage:<v-tab>
<div slot="title"><i class="ti-user"></i> My customized tab</div>
</v-tab>
start-index
is no longer support. v-model/value
should be used insteadbeforeChange
has been deprecated/removed. The usage of this prop was not well documented/showed in examples and implied a lot of changes in order to work properly. If you need it, please use vue-form-wizard or make a fork of this repo as I don't want to include validations in vue-tabs