From e6ccc2fe47db5a948f1d191cb093dd7a82b8267f Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 28 Sep 2022 10:37:22 +0100 Subject: [PATCH 1/2] docs: update `definePageMeta` docs --- docs/content/3.api/3.utils/define-page-meta.md | 14 ++++++++++++++ 1 file changed, 14 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 570524b8f3d..af5c3128a05 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,18 @@ 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. + + **`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` From ef14bcec3be31b0ab5bbe0e2a552da6b82accde4 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 28 Sep 2022 10:39:52 +0100 Subject: [PATCH 2/2] docs: add `StabilityEdge` info --- docs/content/3.api/3.utils/define-page-meta.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 af5c3128a05..ef8ef33ec9f 100644 --- a/docs/content/3.api/3.utils/define-page-meta.md +++ b/docs/content/3.api/3.utils/define-page-meta.md @@ -81,11 +81,13 @@ interface PageMeta { 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. + 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]`**