I have a scenario with two Vuetify tabs in this jsfiddle, but the documentation lacks examples of using vue-router
with them.
After stumbling upon a helpful Medium.com post about integrating Vuetify with vue-router
, I came across the following code:
<div id="app">
<v-tabs grow light>
<v-tabs-bar>
<v-tabs-item href="/" router>
<v-icon>motorcycle</v-icon>
</v-tabs-item>
<v-tabs-item href="/dog" router>
<v-icon>pets</v-icon>
</v-tabs-item>
</v-tabs-bar>
</v-tabs>
<router-view />
</div>
Unfortunately, this code is no longer valid as the Vuetify 1.0.13 Tabs documentation doesn't mention a router
prop in their API, rendering the example from the post useless.
Further searching led me to a helpful StackOverflow answer with this code snippet:
<v-tabs-item :to="{path:'/path/to/somewhere'}">
However, using the to
prop proved ineffective, and it isn't even listed in the Vuetify API. Interestingly, the v-button
Vuetify component does have a to
prop that works with vue-router
, raising the question why a similar support is not provided for Vuetify tabs.
Upon delving into the ancient Vuetify 0.17 documentation, I found a mention of the to
prop for v-tabs-item
, suggesting that support for it may have been removed in version 1.0.13.
So, the big question remains: How can one effectively utilize vue-router
with Vuetify tabs?