From f3a6ab8417299adaee4d81244a010806166841f3 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 5 Dec 2022 18:36:32 +0100 Subject: [PATCH] chore: update examples header Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --- examples/vite/Header.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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), - })) -}) + })), +)