diff --git a/playground/src/main.ts b/playground/src/main.ts index 5ee9c8a23..cb70979e7 100644 --- a/playground/src/main.ts +++ b/playground/src/main.ts @@ -4,7 +4,7 @@ import { createWebHistory, createRouter } from '@vue-router' const router = createRouter({ extendRoutes: (routes) => { - routes.find((r) => r.name === '/')!.meta = {} + // routes.find((r) => r.name === '/')!.meta = {} return routes }, history: createWebHistory(), diff --git a/playground/src/routes/index.vue b/playground/src/routes/index.vue index 4bc46bec4..17f853785 100644 --- a/playground/src/routes/index.vue +++ b/playground/src/routes/index.vue @@ -3,3 +3,7 @@

Home

+ + +{ "name": "home" } + diff --git a/playground/typed-router.d.ts b/playground/typed-router.d.ts index b5a065ecd..eae2e55c7 100644 --- a/playground/typed-router.d.ts +++ b/playground/typed-router.d.ts @@ -19,7 +19,7 @@ import type { declare module '@vue-router/routes' { export interface RouteNamedMap { - '/': RouteRecordInfo<'/', '/', Record, Record>, + 'home': RouteRecordInfo<'home', '/', Record, Record>, '/[name]': RouteRecordInfo<'/[name]', '/:name', { name: ParamValue }, { name: ParamValue }>, '/[...path]': RouteRecordInfo<'/[...path]', '/:path(.*)', { path: ParamValue }, { path: ParamValue }>, '/about': RouteRecordInfo<'/about', '/about', Record, Record>,