Implement Tabs
and Tab
components with the following API:
<tabs v-model="selectedTab">
<tab title="Tab 1">
tab 1 contents here
</tab>
<tab title="Tab 2">
tab 2 contents here
</tab>
<tab title="Tab 3">
tab 3 contents here
</tab>
</tabs>
where selectedTab
is the index of the currently selected tab.
- use slots
- use
this.$children
inTabs
to get the children tabs