diff --git a/examples/vite/Header.vue b/examples/vite/Header.vue index a3a4073e..ea51a071 100644 --- a/examples/vite/Header.vue +++ b/examples/vite/Header.vue @@ -3,25 +3,27 @@ import { useRoute, useRouter } from 'vue-router' import { routes } from './router' const router = useRouter() + const route = useRoute() + const onChange = (event: Event) => { router.push((event.target as HTMLSelectElement).value) } -const computedRoutes = computed(() => { - return routes +const computedRoutes = computed(() => + routes .filter((r) => r.path !== '/') .map((r) => ({ path: r.path, label: r.path.substring(1), - })) -}) + })), +)