@haylee.mertz
To use Vuetify tabs with Vue Router via router name, you can follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 |
const routes = [ { path: '/home', name: 'home', component: Home }, { path: '/about', name: 'about', component: About }, ]; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<template> <v-tabs> <v-tab v-for="route in routes" :key="route.name" :to="{ name: route.name }" > {{ route.name }} </v-tab> </v-tabs> </template> <script> import { routes } from '../router/routes'; export default { data() { return { routes }; } }; </script> |
By following these steps, you can use Vuetify tabs with Vue Router via router name.