mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
docs: update definePageMeta
docs (#7888)
This commit is contained in:
parent
a3fd4193ce
commit
d045deb9fd
@ -19,6 +19,8 @@
|
|||||||
definePageMeta(meta: PageMeta) => void
|
definePageMeta(meta: PageMeta) => void
|
||||||
|
|
||||||
interface PageMeta {
|
interface PageMeta {
|
||||||
|
redirect?: RouteRecordRedirectOption
|
||||||
|
alias?: string | string[]
|
||||||
pageTransition?: boolean | TransitionProps
|
pageTransition?: boolean | TransitionProps
|
||||||
layoutTransition?: boolean | TransitionProps
|
layoutTransition?: boolean | TransitionProps
|
||||||
key?: false | string | ((route: RouteLocationNormalizedLoaded) => string)
|
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).
|
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]`**
|
**`[key: string]`**
|
||||||
|
|
||||||
- **Type**: `any`
|
- **Type**: `any`
|
||||||
|
Loading…
Reference in New Issue
Block a user