From d045deb9fd56a63d9889d851830e3660fe213d59 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 3 Oct 2022 14:41:22 +0100 Subject: [PATCH] docs: update `definePageMeta` docs (#7888) --- docs/content/3.api/3.utils/define-page-meta.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/content/3.api/3.utils/define-page-meta.md b/docs/content/3.api/3.utils/define-page-meta.md index 570524b8f3..ef8ef33ec9 100644 --- a/docs/content/3.api/3.utils/define-page-meta.md +++ b/docs/content/3.api/3.utils/define-page-meta.md @@ -19,6 +19,8 @@ definePageMeta(meta: PageMeta) => void interface PageMeta { + redirect?: RouteRecordRedirectOption + alias?: string | string[] pageTransition?: boolean | TransitionProps layoutTransition?: boolean | TransitionProps key?: false | string | ((route: RouteLocationNormalizedLoaded) => string) @@ -73,6 +75,20 @@ interface PageMeta { Define anonymous or named middleware directly within `definePageMeta`. Learn more about [route middleware](/docs/directory-structure/middleware). + **`redirect`** + + - **Type**: [`RouteRecordRedirectOption`](https://router.vuejs.org/guide/essentials/redirect-and-alias.html#redirect-and-alias) + + Where to redirect if the route is directly matched. The redirection happens before any navigation guard and triggers a new navigation with the new target location. + + :StabilityEdge + + **`alias`** + + - **Type**: `string | string[]` + + Aliases for the record. Allows defining extra paths that will behave like a copy of the record. Allows having paths shorthands like `/users/:id` and `/u/:id`. All `alias` and `path` values must share the same params. + **`[key: string]`** - **Type**: `any`