I would like to use the vuetify tab component simply as a navigation control, to
<v-tabs dark fixed icons centered>
<v-tabs-bar class="cyan">
<v-tabs-slider color="yellow"></v-tabs-slider>
<v-tabs-item router :to="{name: 'election/admin', id: this.$route.params['id']}">
Overview
</v-tabs-item>
</v-tabs-bar>
</v-tabs>
However, it doesn't seem t obe working. I thought that the to
property in addition with router
should work to replace href?
EDIT 2018/11/15
Added new example: codepen
Note:
this answer worked for older
vuetify
version.Tabs syntax has changed since then, and now in
v1
looks like:Answer still applies, but on
v-tab
element, instead ofv-tabs-item
e.g.
<v-tab :to="{path:'/path/to/somewhere'}">
Answer:
Use either:
Or
Notice
path
vsname
You can use
name
if you are using named routeAFAIK you can't pass
props
if you are not usingnamed route
, thus you must name it and thenAlso notice that params must be inside
params
object