From 01e42baa25a493e47c4ca351bea5b5d82d1877b6 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 1 Aug 2023 20:16:32 +0200 Subject: [PATCH] docs: update api files --- .../docs/api/enums/NavigationFailureType.md | 10 +- packages/docs/api/index.md | 158 ++++++++------- packages/docs/api/interfaces/HistoryState.md | 2 +- .../docs/api/interfaces/NavigationFailure.md | 26 +-- .../docs/api/interfaces/NavigationGuard.md | 8 +- .../api/interfaces/NavigationGuardNext.md | 32 +-- .../api/interfaces/NavigationGuardWithThis.md | 10 +- .../api/interfaces/NavigationHookAfter.md | 8 +- packages/docs/api/interfaces/RouteLocation.md | 48 ++--- .../api/interfaces/RouteLocationMatched.md | 75 +++---- .../api/interfaces/RouteLocationNormalized.md | 44 ++--- .../RouteLocationNormalizedLoaded.md | 46 ++--- .../api/interfaces/RouteLocationOptions.md | 8 +- packages/docs/api/interfaces/RouteMeta.md | 2 +- .../docs/api/interfaces/RouteRecordBase.md | 149 ++++++++++++++ .../interfaces/RouteRecordMultipleViews.md | 187 ++++++++++++++++++ .../RouteRecordMultipleViewsWithChildren.md | 187 ++++++++++++++++++ .../api/interfaces/RouteRecordNormalized.md | 49 ++--- .../api/interfaces/RouteRecordRedirect.md | 184 +++++++++++++++++ .../api/interfaces/RouteRecordSingleView.md | 185 +++++++++++++++++ .../RouteRecordSingleViewWithChildren.md | 185 +++++++++++++++++ packages/docs/api/interfaces/Router.md | 178 ++++++++--------- packages/docs/api/interfaces/RouterHistory.md | 60 +++--- .../docs/api/interfaces/RouterLinkProps.md | 22 +-- packages/docs/api/interfaces/RouterOptions.md | 78 ++++---- .../api/interfaces/RouterScrollBehavior.md | 8 +- .../docs/api/interfaces/RouterViewProps.md | 6 +- 27 files changed, 1526 insertions(+), 429 deletions(-) create mode 100644 packages/docs/api/interfaces/RouteRecordBase.md create mode 100644 packages/docs/api/interfaces/RouteRecordMultipleViews.md create mode 100644 packages/docs/api/interfaces/RouteRecordMultipleViewsWithChildren.md create mode 100644 packages/docs/api/interfaces/RouteRecordRedirect.md create mode 100644 packages/docs/api/interfaces/RouteRecordSingleView.md create mode 100644 packages/docs/api/interfaces/RouteRecordSingleViewWithChildren.md diff --git a/packages/docs/api/enums/NavigationFailureType.md b/packages/docs/api/enums/NavigationFailureType.md index 92b9d6ab..e7ccd241 100644 --- a/packages/docs/api/enums/NavigationFailureType.md +++ b/packages/docs/api/enums/NavigationFailureType.md @@ -7,11 +7,11 @@ editLink: false # Enumeration: NavigationFailureType Enumeration with all possible types for navigation failures. Can be passed to -[isNavigationFailure](../index.md#isnavigationfailure) to check for specific failures. +[isNavigationFailure](../index.md#isNavigationFailure) to check for specific failures. -## Enumeration Members %{#Enumeration-Members}% +## Enumeration Members -### aborted %{#Enumeration-Members-aborted}% +### aborted • **aborted** = ``4`` @@ -20,7 +20,7 @@ guard returned `false` or called `next(false)` ___ -### cancelled %{#Enumeration-Members-cancelled}% +### cancelled • **cancelled** = ``8`` @@ -29,7 +29,7 @@ navigation finished started (not necessarily finished). ___ -### duplicated %{#Enumeration-Members-duplicated}% +### duplicated • **duplicated** = ``16`` diff --git a/packages/docs/api/index.md b/packages/docs/api/index.md index 3c315188..599abf1e 100644 --- a/packages/docs/api/index.md +++ b/packages/docs/api/index.md @@ -1,12 +1,16 @@ +--- +editLink: false +--- + API Documentation # API Documentation -## Enumerations %{#Enumerations}% +## Enumerations - [NavigationFailureType](enums/NavigationFailureType.md) -## Interfaces %{#Interfaces}% +## Interfaces - [HistoryState](interfaces/HistoryState.md) - [NavigationFailure](interfaces/NavigationFailure.md) @@ -20,17 +24,23 @@ API Documentation - [RouteLocationNormalizedLoaded](interfaces/RouteLocationNormalizedLoaded.md) - [RouteLocationOptions](interfaces/RouteLocationOptions.md) - [RouteMeta](interfaces/RouteMeta.md) +- [RouteRecordMultipleViews](interfaces/RouteRecordMultipleViews.md) +- [RouteRecordMultipleViewsWithChildren](interfaces/RouteRecordMultipleViewsWithChildren.md) - [RouteRecordNormalized](interfaces/RouteRecordNormalized.md) +- [RouteRecordRedirect](interfaces/RouteRecordRedirect.md) +- [RouteRecordSingleView](interfaces/RouteRecordSingleView.md) +- [RouteRecordSingleViewWithChildren](interfaces/RouteRecordSingleViewWithChildren.md) - [Router](interfaces/Router.md) - [RouterHistory](interfaces/RouterHistory.md) - [RouterLinkProps](interfaces/RouterLinkProps.md) - [RouterOptions](interfaces/RouterOptions.md) - [RouterScrollBehavior](interfaces/RouterScrollBehavior.md) - [RouterViewProps](interfaces/RouterViewProps.md) +- [\_RouteRecordBase](interfaces/RouteRecordBase.md) -## Type Aliases %{#Type-Aliases}% +## Type Aliases -### LocationQuery %{#Type-Aliases-LocationQuery}% +### LocationQuery Ƭ **LocationQuery**: `Record`<`string`, `LocationQueryValue` \| `LocationQueryValue`[]\> @@ -38,23 +48,23 @@ Normalized query object that appears in [RouteLocationNormalized](interfaces/Rou ___ -### LocationQueryRaw %{#Type-Aliases-LocationQueryRaw}% +### LocationQueryRaw Ƭ **LocationQueryRaw**: `Record`<`string` \| `number`, `LocationQueryValueRaw` \| `LocationQueryValueRaw`[]\> -Loose [LocationQuery](index.md#locationquery) object that can be passed to functions like +Loose [LocationQuery](index.md#LocationQuery) object that can be passed to functions like [push](interfaces/Router.md#push) and [replace](interfaces/Router.md#replace) or anywhere when creating a -[RouteLocationRaw](index.md#routelocationraw) +[RouteLocationRaw](index.md#RouteLocationRaw) ___ -### PathParserOptions %{#Type-Aliases-PathParserOptions}% +### PathParserOptions Ƭ **PathParserOptions**: `Pick`<`_PathParserOptions`, ``"end"`` \| ``"sensitive"`` \| ``"strict"``\> ___ -### RouteComponent %{#Type-Aliases-RouteComponent}% +### RouteComponent Ƭ **RouteComponent**: `Component` \| `DefineComponent` @@ -62,7 +72,7 @@ Allowed Component in [RouteLocationMatched](interfaces/RouteLocationMatched.md) ___ -### RouteLocationRaw %{#Type-Aliases-RouteLocationRaw}% +### RouteLocationRaw Ƭ **RouteLocationRaw**: `string` \| `RouteLocationPathRaw` \| `RouteLocationNamedRaw` @@ -70,27 +80,27 @@ User-level route location ___ -### RouteParams %{#Type-Aliases-RouteParams}% +### RouteParams Ƭ **RouteParams**: `Record`<`string`, `RouteParamValue` \| `RouteParamValue`[]\> ___ -### RouteParamsRaw %{#Type-Aliases-RouteParamsRaw}% +### RouteParamsRaw Ƭ **RouteParamsRaw**: `Record`<`string`, `RouteParamValueRaw` \| `Exclude`<`RouteParamValueRaw`, ``null`` \| `undefined`\>[]\> ___ -### RouteRecord %{#Type-Aliases-RouteRecord}% +### RouteRecord Ƭ **RouteRecord**: [`RouteRecordNormalized`](interfaces/RouteRecordNormalized.md) -Normalized version of a [route record](index.md#routerecord). +Normalized version of a [route record](index.md#RouteRecord). ___ -### RouteRecordName %{#Type-Aliases-RouteRecordName}% +### RouteRecordName Ƭ **RouteRecordName**: `string` \| `symbol` @@ -98,19 +108,19 @@ Possible values for a user-defined route record's name ___ -### RouteRecordRaw %{#Type-Aliases-RouteRecordRaw}% +### RouteRecordRaw -Ƭ **RouteRecordRaw**: `RouteRecordSingleView` \| `RouteRecordSingleViewWithChildren` \| `RouteRecordMultipleViews` \| `RouteRecordMultipleViewsWithChildren` \| `RouteRecordRedirect` +Ƭ **RouteRecordRaw**: [`RouteRecordSingleView`](interfaces/RouteRecordSingleView.md) \| [`RouteRecordSingleViewWithChildren`](interfaces/RouteRecordSingleViewWithChildren.md) \| [`RouteRecordMultipleViews`](interfaces/RouteRecordMultipleViews.md) \| [`RouteRecordMultipleViewsWithChildren`](interfaces/RouteRecordMultipleViewsWithChildren.md) \| [`RouteRecordRedirect`](interfaces/RouteRecordRedirect.md) ___ -### UseLinkOptions %{#Type-Aliases-UseLinkOptions}% +### UseLinkOptions Ƭ **UseLinkOptions**: `VueUseOptions`<`RouterLinkOptions`\> -## Variables %{#Variables}% +## Variables -### RouterLink %{#Variables-RouterLink}% +### RouterLink • `Const` **RouterLink**: `_RouterLinkI` @@ -118,11 +128,11 @@ Component to render a link that triggers a navigation on click. ___ -### RouterView %{#Variables-RouterView}% +### RouterView • `Const` **RouterView**: () => { `$props`: `AllowedComponentProps` & `ComponentCustomProps` & `VNodeProps` & [`RouterViewProps`](interfaces/RouterViewProps.md) ; `$slots`: { `default?`: (`__namedParameters`: { `Component`: `VNode`<`RendererNode`, `RendererElement`, { `[key: string]`: `any`; }\> ; `route`: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) }) => `VNode`<`RendererNode`, `RendererElement`, { `[key: string]`: `any`; }\>[] } } -#### Type declaration %{#Variables-RouterView-Type-declaration}% +#### Type declaration • **new RouterView**() @@ -130,7 +140,7 @@ Component to display the current route the user is at. ___ -### START\_LOCATION %{#Variables-START_LOCATION}% +### START\_LOCATION • `Const` **START\_LOCATION**: [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) @@ -149,22 +159,22 @@ router.beforeEach((to, from) => { }) ``` -## Functions %{#Functions}% +## Functions -### createMemoryHistory %{#Functions-createMemoryHistory}% +### createMemoryHistory ▸ **createMemoryHistory**(`base?`): [`RouterHistory`](interfaces/RouterHistory.md) Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere. It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`. -#### Parameters %{#Functions-createMemoryHistory-Parameters}% +#### Parameters | Name | Type | Default value | Description | | :------ | :------ | :------ | :------ | | `base` | `string` | `''` | Base applied to all urls, defaults to '/' | -#### Returns %{#Functions-createMemoryHistory-Returns}% +#### Returns [`RouterHistory`](interfaces/RouterHistory.md) @@ -172,31 +182,41 @@ a history object that can be passed to the router constructor ___ -### createRouter %{#Functions-createRouter}% +### createRouter ▸ **createRouter**(`options`): [`Router`](interfaces/Router.md) Creates a Router instance that can be used by a Vue app. -#### Parameters %{#Functions-createRouter-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `options` | [`RouterOptions`](interfaces/RouterOptions.md) | [RouterOptions](interfaces/RouterOptions.md) | -#### Returns %{#Functions-createRouter-Returns}% +#### Returns [`Router`](interfaces/Router.md) ___ -### createWebHashHistory %{#Functions-createWebHashHistory}% +### createWebHashHistory ▸ **createWebHashHistory**(`base?`): [`RouterHistory`](interfaces/RouterHistory.md) Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to handle any URL is not possible. +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `base?` | `string` | optional base to provide. Defaults to `location.pathname + location.search` If there is a `` tag in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState() calls**, meaning that if you use a `` tag, it's `href` value **has to match this parameter** (ignoring anything after the `#`). | + +#### Returns + +[`RouterHistory`](interfaces/RouterHistory.md) + **`Example`** ```js @@ -213,42 +233,43 @@ createWebHashHistory('/other-folder/') // gives a url of `https://example.com/ot createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#` ``` -#### Parameters %{#Functions-createWebHashHistory-Parameters}% - -| Name | Type | Description | -| :------ | :------ | :------ | -| `base?` | `string` | optional base to provide. Defaults to `location.pathname + location.search` If there is a `` tag in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState() calls**, meaning that if you use a `` tag, it's `href` value **has to match this parameter** (ignoring anything after the `#`). | - -#### Returns %{#Functions-createWebHashHistory-Returns}% - -[`RouterHistory`](interfaces/RouterHistory.md) - ___ -### createWebHistory %{#Functions-createWebHistory}% +### createWebHistory ▸ **createWebHistory**(`base?`): [`RouterHistory`](interfaces/RouterHistory.md) Creates an HTML5 history. Most common history for single page applications. -#### Parameters %{#Functions-createWebHistory-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | | `base?` | `string` | -#### Returns %{#Functions-createWebHistory-Returns}% +#### Returns [`RouterHistory`](interfaces/RouterHistory.md) ___ -### isNavigationFailure %{#Functions-isNavigationFailure}% +### isNavigationFailure ▸ **isNavigationFailure**(`error`, `type?`): error is NavigationRedirectError Check if an object is a [NavigationFailure](interfaces/NavigationFailure.md). +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `error` | `any` | possible [NavigationFailure](interfaces/NavigationFailure.md) | +| `type?` | `NAVIGATION_GUARD_REDIRECT` | optional types to check for | + +#### Returns + +error is NavigationRedirectError + **`Example`** ```js @@ -270,51 +291,40 @@ router.afterEach((to, from, failure) => { }) ``` -#### Parameters %{#Functions-isNavigationFailure-Parameters}% - -| Name | Type | Description | -| :------ | :------ | :------ | -| `error` | `any` | possible [NavigationFailure](interfaces/NavigationFailure.md) | -| `type?` | `NAVIGATION_GUARD_REDIRECT` | optional types to check for | - -#### Returns %{#Functions-isNavigationFailure-Returns}% - -error is NavigationRedirectError - ▸ **isNavigationFailure**(`error`, `type?`): error is NavigationFailure -#### Parameters %{#Functions-isNavigationFailure-Parameters_1}% +#### Parameters | Name | Type | | :------ | :------ | | `error` | `any` | | `type?` | `ErrorTypes` \| [`NavigationFailureType`](enums/NavigationFailureType.md) | -#### Returns %{#Functions-isNavigationFailure-Returns_1}% +#### Returns error is NavigationFailure ___ -### loadRouteLocation %{#Functions-loadRouteLocation}% +### loadRouteLocation ▸ **loadRouteLocation**(`route`): `Promise`<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\> Ensures a route is loaded, so it can be passed as o prop to ``. -#### Parameters %{#Functions-loadRouteLocation-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `route` | [`RouteLocationNormalized`](interfaces/RouteLocationNormalized.md) | resolved route to load | -#### Returns %{#Functions-loadRouteLocation-Returns}% +#### Returns `Promise`<[`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md)\> ___ -### onBeforeRouteLeave %{#Functions-onBeforeRouteLeave}% +### onBeforeRouteLeave ▸ **onBeforeRouteLeave**(`leaveGuard`): `void` @@ -322,19 +332,19 @@ Add a navigation guard that triggers whenever the component for the current location is about to be left. Similar to beforeRouteLeave but can be used in any component. The guard is removed when the component is unmounted. -#### Parameters %{#Functions-onBeforeRouteLeave-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `leaveGuard` | [`NavigationGuard`](interfaces/NavigationGuard.md) | [NavigationGuard](interfaces/NavigationGuard.md) | -#### Returns %{#Functions-onBeforeRouteLeave-Returns}% +#### Returns `void` ___ -### onBeforeRouteUpdate %{#Functions-onBeforeRouteUpdate}% +### onBeforeRouteUpdate ▸ **onBeforeRouteUpdate**(`updateGuard`): `void` @@ -342,29 +352,29 @@ Add a navigation guard that triggers whenever the current location is about to be updated. Similar to beforeRouteUpdate but can be used in any component. The guard is removed when the component is unmounted. -#### Parameters %{#Functions-onBeforeRouteUpdate-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `updateGuard` | [`NavigationGuard`](interfaces/NavigationGuard.md) | [NavigationGuard](interfaces/NavigationGuard.md) | -#### Returns %{#Functions-onBeforeRouteUpdate-Returns}% +#### Returns `void` ___ -### useLink %{#Functions-useLink}% +### useLink ▸ **useLink**(`props`): `Object` -#### Parameters %{#Functions-useLink-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | | `props` | `VueUseOptions`<`RouterLinkOptions`\> | -#### Returns %{#Functions-useLink-Returns}% +#### Returns `Object` @@ -378,26 +388,26 @@ ___ ___ -### useRoute %{#Functions-useRoute}% +### useRoute ▸ **useRoute**(): [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) Returns the current route location. Equivalent to using `$route` inside templates. -#### Returns %{#Functions-useRoute-Returns}% +#### Returns [`RouteLocationNormalizedLoaded`](interfaces/RouteLocationNormalizedLoaded.md) ___ -### useRouter %{#Functions-useRouter}% +### useRouter ▸ **useRouter**(): [`Router`](interfaces/Router.md) Returns the router instance. Equivalent to using `$router` inside templates. -#### Returns %{#Functions-useRouter-Returns}% +#### Returns [`Router`](interfaces/Router.md) diff --git a/packages/docs/api/interfaces/HistoryState.md b/packages/docs/api/interfaces/HistoryState.md index 63828f60..ab0ffc71 100644 --- a/packages/docs/api/interfaces/HistoryState.md +++ b/packages/docs/api/interfaces/HistoryState.md @@ -8,6 +8,6 @@ editLink: false Allowed HTML history.state -## Indexable %{#Indexable}% +## Indexable ▪ [x: `number`]: `HistoryStateValue` diff --git a/packages/docs/api/interfaces/NavigationFailure.md b/packages/docs/api/interfaces/NavigationFailure.md index d49b8c4f..c9e80423 100644 --- a/packages/docs/api/interfaces/NavigationFailure.md +++ b/packages/docs/api/interfaces/NavigationFailure.md @@ -8,25 +8,25 @@ editLink: false Extended Error that contains extra information regarding a failed navigation. -## Hierarchy %{#Hierarchy}% +## Hierarchy - `Error` ↳ **`NavigationFailure`** -## Properties %{#Properties}% +## Properties -### cause %{#Properties-cause}% +### cause • `Optional` **cause**: `unknown` -#### Inherited from %{#Properties-cause-Inherited-from}% +#### Inherited from Error.cause ___ -### from %{#Properties-from}% +### from • **from**: [`RouteLocationNormalized`](RouteLocationNormalized.md) @@ -34,37 +34,37 @@ Route location we were navigating from ___ -### message %{#Properties-message}% +### message • **message**: `string` -#### Inherited from %{#Properties-message-Inherited-from}% +#### Inherited from Error.message ___ -### name %{#Properties-name}% +### name • **name**: `string` -#### Inherited from %{#Properties-name-Inherited-from}% +#### Inherited from Error.name ___ -### stack %{#Properties-stack}% +### stack • `Optional` **stack**: `string` -#### Inherited from %{#Properties-stack-Inherited-from}% +#### Inherited from Error.stack ___ -### to %{#Properties-to}% +### to • **to**: [`RouteLocationNormalized`](RouteLocationNormalized.md) @@ -72,7 +72,7 @@ Route location we were navigating to ___ -### type %{#Properties-type}% +### type • **type**: `NAVIGATION_ABORTED` \| `NAVIGATION_CANCELLED` \| `NAVIGATION_DUPLICATED` diff --git a/packages/docs/api/interfaces/NavigationGuard.md b/packages/docs/api/interfaces/NavigationGuard.md index b2859108..ab2c2809 100644 --- a/packages/docs/api/interfaces/NavigationGuard.md +++ b/packages/docs/api/interfaces/NavigationGuard.md @@ -9,13 +9,13 @@ editLink: false Navigation guard. See [Navigation Guards](/guide/advanced/navigation-guards.md). -## Callable %{#Callable}% +## Callable -### NavigationGuard %{#Callable-NavigationGuard}% +### NavigationGuard ▸ **NavigationGuard**(`to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\> -#### Parameters %{#Callable-NavigationGuard-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | @@ -23,6 +23,6 @@ Guards](/guide/advanced/navigation-guards.md). | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) | | `next` | [`NavigationGuardNext`](NavigationGuardNext.md) | -#### Returns %{#Callable-NavigationGuard-Returns}% +#### Returns `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\> diff --git a/packages/docs/api/interfaces/NavigationGuardNext.md b/packages/docs/api/interfaces/NavigationGuardNext.md index 278770b6..b736b12d 100644 --- a/packages/docs/api/interfaces/NavigationGuardNext.md +++ b/packages/docs/api/interfaces/NavigationGuardNext.md @@ -6,68 +6,68 @@ editLink: false # Interface: NavigationGuardNext -## Callable %{#Callable}% +## Callable -### NavigationGuardNext %{#Callable-NavigationGuardNext}% +### NavigationGuardNext ▸ **NavigationGuardNext**(): `void` -#### Returns %{#Callable-NavigationGuardNext-Returns}% +#### Returns `void` -### NavigationGuardNext %{#Callable-NavigationGuardNext_1}% +### NavigationGuardNext ▸ **NavigationGuardNext**(`error`): `void` -#### Parameters %{#Callable-NavigationGuardNext-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | | `error` | `Error` | -#### Returns %{#Callable-NavigationGuardNext-Returns_1}% +#### Returns `void` -### NavigationGuardNext %{#Callable-NavigationGuardNext_2}% +### NavigationGuardNext ▸ **NavigationGuardNext**(`location`): `void` -#### Parameters %{#Callable-NavigationGuardNext-Parameters_1}% +#### Parameters | Name | Type | | :------ | :------ | -| `location` | [`RouteLocationRaw`](../index.md#routelocationraw) | +| `location` | [`RouteLocationRaw`](../index.md#RouteLocationRaw) | -#### Returns %{#Callable-NavigationGuardNext-Returns_2}% +#### Returns `void` -### NavigationGuardNext %{#Callable-NavigationGuardNext_3}% +### NavigationGuardNext ▸ **NavigationGuardNext**(`valid`): `void` -#### Parameters %{#Callable-NavigationGuardNext-Parameters_2}% +#### Parameters | Name | Type | | :------ | :------ | | `valid` | `undefined` \| `boolean` | -#### Returns %{#Callable-NavigationGuardNext-Returns_3}% +#### Returns `void` -### NavigationGuardNext %{#Callable-NavigationGuardNext_4}% +### NavigationGuardNext ▸ **NavigationGuardNext**(`cb`): `void` -#### Parameters %{#Callable-NavigationGuardNext-Parameters_3}% +#### Parameters | Name | Type | | :------ | :------ | | `cb` | `NavigationGuardNextCallback` | -#### Returns %{#Callable-NavigationGuardNext-Returns_4}% +#### Returns `void` diff --git a/packages/docs/api/interfaces/NavigationGuardWithThis.md b/packages/docs/api/interfaces/NavigationGuardWithThis.md index a9bc50c8..dc8127fb 100644 --- a/packages/docs/api/interfaces/NavigationGuardWithThis.md +++ b/packages/docs/api/interfaces/NavigationGuardWithThis.md @@ -9,19 +9,19 @@ editLink: false Navigation guard. See [Navigation Guards](/guide/advanced/navigation-guards.md). -## Type parameters %{#Type-parameters}% +## Type parameters | Name | | :------ | | `T` | -## Callable %{#Callable}% +## Callable -### NavigationGuardWithThis %{#Callable-NavigationGuardWithThis}% +### NavigationGuardWithThis ▸ **NavigationGuardWithThis**(`this`, `to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\> -#### Parameters %{#Callable-NavigationGuardWithThis-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | @@ -30,6 +30,6 @@ Guards](/guide/advanced/navigation-guards.md). | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) | | `next` | [`NavigationGuardNext`](NavigationGuardNext.md) | -#### Returns %{#Callable-NavigationGuardWithThis-Returns}% +#### Returns `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\> diff --git a/packages/docs/api/interfaces/NavigationHookAfter.md b/packages/docs/api/interfaces/NavigationHookAfter.md index 34fe56b2..309d1131 100644 --- a/packages/docs/api/interfaces/NavigationHookAfter.md +++ b/packages/docs/api/interfaces/NavigationHookAfter.md @@ -6,13 +6,13 @@ editLink: false # Interface: NavigationHookAfter -## Callable %{#Callable}% +## Callable -### NavigationHookAfter %{#Callable-NavigationHookAfter}% +### NavigationHookAfter ▸ **NavigationHookAfter**(`to`, `from`, `failure?`): `any` -#### Parameters %{#Callable-NavigationHookAfter-Parameters}% +#### Parameters | Name | Type | | :------ | :------ | @@ -20,6 +20,6 @@ editLink: false | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) | | `failure?` | `void` \| [`NavigationFailure`](NavigationFailure.md) | -#### Returns %{#Callable-NavigationHookAfter-Returns}% +#### Returns `any` diff --git a/packages/docs/api/interfaces/RouteLocation.md b/packages/docs/api/interfaces/RouteLocation.md index 9a23955a..0aa1986e 100644 --- a/packages/docs/api/interfaces/RouteLocation.md +++ b/packages/docs/api/interfaces/RouteLocation.md @@ -6,118 +6,118 @@ editLink: false # Interface: RouteLocation -[RouteLocationRaw](../index.md#routelocationraw) resolved using the matcher +[RouteLocationRaw](../index.md#RouteLocationRaw) resolved using the matcher -## Hierarchy %{#Hierarchy}% +## Hierarchy - `_RouteLocationBase` ↳ **`RouteLocation`** -## Properties %{#Properties}% +## Properties -### fullPath %{#Properties-fullPath}% +### fullPath • **fullPath**: `string` The whole location including the `search` and `hash`. This string is percentage encoded. -#### Inherited from %{#Properties-fullPath-Inherited-from}% +#### Inherited from \_RouteLocationBase.fullPath ___ -### hash %{#Properties-hash}% +### hash • **hash**: `string` Hash of the current location. If present, starts with a `#`. -#### Inherited from %{#Properties-hash-Inherited-from}% +#### Inherited from \_RouteLocationBase.hash ___ -### matched %{#Properties-matched}% +### matched • **matched**: [`RouteRecordNormalized`](RouteRecordNormalized.md)[] -Array of [RouteRecord](../index.md#routerecord) containing components as they were +Array of [RouteRecord](../index.md#RouteRecord) containing components as they were passed when adding records. It can also contain redirect records. This can't be used directly ___ -### meta %{#Properties-meta}% +### meta • **meta**: [`RouteMeta`](RouteMeta.md) Merged `meta` properties from all the matched route records. -#### Inherited from %{#Properties-meta-Inherited-from}% +#### Inherited from \_RouteLocationBase.meta ___ -### name %{#Properties-name}% +### name -• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname) +• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#RouteRecordName) Name of the matched record -#### Inherited from %{#Properties-name-Inherited-from}% +#### Inherited from \_RouteLocationBase.name ___ -### params %{#Properties-params}% +### params -• **params**: [`RouteParams`](../index.md#routeparams) +• **params**: [`RouteParams`](../index.md#RouteParams) Object of decoded params extracted from the `path`. -#### Inherited from %{#Properties-params-Inherited-from}% +#### Inherited from \_RouteLocationBase.params ___ -### path %{#Properties-path}% +### path • **path**: `string` Percentage encoded pathname section of the URL. -#### Inherited from %{#Properties-path-Inherited-from}% +#### Inherited from \_RouteLocationBase.path ___ -### query %{#Properties-query}% +### query -• **query**: [`LocationQuery`](../index.md#locationquery) +• **query**: [`LocationQuery`](../index.md#LocationQuery) Object representation of the `search` property of the current location. -#### Inherited from %{#Properties-query-Inherited-from}% +#### Inherited from \_RouteLocationBase.query ___ -### redirectedFrom %{#Properties-redirectedFrom}% +### redirectedFrom • **redirectedFrom**: `undefined` \| [`RouteLocation`](RouteLocation.md) Contains the location we were initially trying to access before ending up on the current location. -#### Inherited from %{#Properties-redirectedFrom-Inherited-from}% +#### Inherited from \_RouteLocationBase.redirectedFrom diff --git a/packages/docs/api/interfaces/RouteLocationMatched.md b/packages/docs/api/interfaces/RouteLocationMatched.md index 82a32405..55d6d331 100644 --- a/packages/docs/api/interfaces/RouteLocationMatched.md +++ b/packages/docs/api/interfaces/RouteLocationMatched.md @@ -6,68 +6,68 @@ editLink: false # Interface: RouteLocationMatched -Normalized version of a [route record](../index.md#routerecord). +Normalized version of a [route record](../index.md#RouteRecord). -## Hierarchy %{#Hierarchy}% +## Hierarchy - [`RouteRecordNormalized`](RouteRecordNormalized.md) ↳ **`RouteLocationMatched`** -## Properties %{#Properties}% +## Properties -### aliasOf %{#Properties-aliasOf}% +### aliasOf • **aliasOf**: `undefined` \| [`RouteRecordNormalized`](RouteRecordNormalized.md) Defines if this record is the alias of another one. This property is `undefined` if the record is the original one. -#### Inherited from %{#Properties-aliasOf-Inherited-from}% +#### Inherited from -[RouteRecordNormalized](RouteRecordNormalized.md).[aliasOf](RouteRecordNormalized.md#aliasof) +[RouteRecordNormalized](RouteRecordNormalized.md).[aliasOf](RouteRecordNormalized.md#aliasOf) ___ -### beforeEnter %{#Properties-beforeEnter}% +### beforeEnter • **beforeEnter**: `undefined` \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] Registered beforeEnter guards -#### Inherited from %{#Properties-beforeEnter-Inherited-from}% +#### Inherited from -[RouteRecordNormalized](RouteRecordNormalized.md).[beforeEnter](RouteRecordNormalized.md#beforeenter) +[RouteRecordNormalized](RouteRecordNormalized.md).[beforeEnter](RouteRecordNormalized.md#beforeEnter) ___ -### children %{#Properties-children}% +### children -• **children**: [`RouteRecordRaw`](../index.md#routerecordraw)[] +• **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] Nested route records. -#### Inherited from %{#Properties-children-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[children](RouteRecordNormalized.md#children) ___ -### components %{#Properties-components}% +### components -• **components**: `undefined` \| ``null`` \| `Record`<`string`, [`RouteComponent`](../index.md#routecomponent)\> +• **components**: `undefined` \| ``null`` \| `Record`<`string`, [`RouteComponent`](../index.md#RouteComponent)\> -{@inheritDoc RouteRecordMultipleViews.components} +Components to display when the URL matches this route. Allow using named views. -#### Overrides %{#Properties-components-Overrides}% +#### Overrides [RouteRecordNormalized](RouteRecordNormalized.md).[components](RouteRecordNormalized.md#components) ___ -### instances %{#Properties-instances}% +### instances -• **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\>\> +• **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`\> Mounted route component instances Having the instances on the record mean beforeRouteUpdate and @@ -77,66 +77,71 @@ view, basically duplicating the content on the page, which shouldn't happen in practice. It will work if multiple apps are rendering different named views. -#### Inherited from %{#Properties-instances-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[instances](RouteRecordNormalized.md#instances) ___ -### meta %{#Properties-meta}% +### meta • **meta**: [`RouteMeta`](RouteMeta.md) -{@inheritDoc _RouteRecordBase.meta} +Arbitrary data attached to the record. -#### Inherited from %{#Properties-meta-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[meta](RouteRecordNormalized.md#meta) ___ -### name %{#Properties-name}% +### name -• **name**: `undefined` \| [`RouteRecordName`](../index.md#routerecordname) +• **name**: `undefined` \| [`RouteRecordName`](../index.md#RouteRecordName) -{@inheritDoc _RouteRecordBase.name} +Name for the route record. Must be unique. -#### Inherited from %{#Properties-name-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[name](RouteRecordNormalized.md#name) ___ -### path %{#Properties-path}% +### path • **path**: `string` -{@inheritDoc _RouteRecordBase.path} +Path of the record. Should start with `/` unless the record is the child of +another record. -#### Inherited from %{#Properties-path-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[path](RouteRecordNormalized.md#path) ___ -### props %{#Properties-props}% +### props • **props**: `Record`<`string`, `_RouteRecordProps`\> -{@inheritDoc RouteRecordMultipleViews.props} +Allow passing down params as props to the component rendered by +`router-view`. Should be an object with the same keys as `components` or a +boolean to be applied to every component. -#### Inherited from %{#Properties-props-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[props](RouteRecordNormalized.md#props) ___ -### redirect %{#Properties-redirect}% +### redirect • **redirect**: `undefined` \| `RouteRecordRedirectOption` -{@inheritDoc _RouteRecordBase.redirect} +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. -#### Inherited from %{#Properties-redirect-Inherited-from}% +#### Inherited from [RouteRecordNormalized](RouteRecordNormalized.md).[redirect](RouteRecordNormalized.md#redirect) diff --git a/packages/docs/api/interfaces/RouteLocationNormalized.md b/packages/docs/api/interfaces/RouteLocationNormalized.md index 2e49471d..57338016 100644 --- a/packages/docs/api/interfaces/RouteLocationNormalized.md +++ b/packages/docs/api/interfaces/RouteLocationNormalized.md @@ -9,40 +9,40 @@ editLink: false Similar to [RouteLocation](RouteLocation.md) but its [matched](RouteLocationNormalized.md#matched) cannot contain redirect records -## Hierarchy %{#Hierarchy}% +## Hierarchy - `_RouteLocationBase` ↳ **`RouteLocationNormalized`** -## Properties %{#Properties}% +## Properties -### fullPath %{#Properties-fullPath}% +### fullPath • **fullPath**: `string` The whole location including the `search` and `hash`. This string is percentage encoded. -#### Inherited from %{#Properties-fullPath-Inherited-from}% +#### Inherited from \_RouteLocationBase.fullPath ___ -### hash %{#Properties-hash}% +### hash • **hash**: `string` Hash of the current location. If present, starts with a `#`. -#### Inherited from %{#Properties-hash-Inherited-from}% +#### Inherited from \_RouteLocationBase.hash ___ -### matched %{#Properties-matched}% +### matched • **matched**: [`RouteRecordNormalized`](RouteRecordNormalized.md)[] @@ -50,73 +50,73 @@ Array of [RouteRecordNormalized](RouteRecordNormalized.md) ___ -### meta %{#Properties-meta}% +### meta • **meta**: [`RouteMeta`](RouteMeta.md) Merged `meta` properties from all the matched route records. -#### Inherited from %{#Properties-meta-Inherited-from}% +#### Inherited from \_RouteLocationBase.meta ___ -### name %{#Properties-name}% +### name -• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname) +• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#RouteRecordName) Name of the matched record -#### Inherited from %{#Properties-name-Inherited-from}% +#### Inherited from \_RouteLocationBase.name ___ -### params %{#Properties-params}% +### params -• **params**: [`RouteParams`](../index.md#routeparams) +• **params**: [`RouteParams`](../index.md#RouteParams) Object of decoded params extracted from the `path`. -#### Inherited from %{#Properties-params-Inherited-from}% +#### Inherited from \_RouteLocationBase.params ___ -### path %{#Properties-path}% +### path • **path**: `string` Percentage encoded pathname section of the URL. -#### Inherited from %{#Properties-path-Inherited-from}% +#### Inherited from \_RouteLocationBase.path ___ -### query %{#Properties-query}% +### query -• **query**: [`LocationQuery`](../index.md#locationquery) +• **query**: [`LocationQuery`](../index.md#LocationQuery) Object representation of the `search` property of the current location. -#### Inherited from %{#Properties-query-Inherited-from}% +#### Inherited from \_RouteLocationBase.query ___ -### redirectedFrom %{#Properties-redirectedFrom}% +### redirectedFrom • **redirectedFrom**: `undefined` \| [`RouteLocation`](RouteLocation.md) Contains the location we were initially trying to access before ending up on the current location. -#### Inherited from %{#Properties-redirectedFrom-Inherited-from}% +#### Inherited from \_RouteLocationBase.redirectedFrom diff --git a/packages/docs/api/interfaces/RouteLocationNormalizedLoaded.md b/packages/docs/api/interfaces/RouteLocationNormalizedLoaded.md index 0f3b828a..79b02838 100644 --- a/packages/docs/api/interfaces/RouteLocationNormalizedLoaded.md +++ b/packages/docs/api/interfaces/RouteLocationNormalizedLoaded.md @@ -6,42 +6,42 @@ editLink: false # Interface: RouteLocationNormalizedLoaded -[RouteLocationRaw](../index.md#routelocationraw) with +[RouteLocationRaw](../index.md#RouteLocationRaw) with -## Hierarchy %{#Hierarchy}% +## Hierarchy - `_RouteLocationBase` ↳ **`RouteLocationNormalizedLoaded`** -## Properties %{#Properties}% +## Properties -### fullPath %{#Properties-fullPath}% +### fullPath • **fullPath**: `string` The whole location including the `search` and `hash`. This string is percentage encoded. -#### Inherited from %{#Properties-fullPath-Inherited-from}% +#### Inherited from \_RouteLocationBase.fullPath ___ -### hash %{#Properties-hash}% +### hash • **hash**: `string` Hash of the current location. If present, starts with a `#`. -#### Inherited from %{#Properties-hash-Inherited-from}% +#### Inherited from \_RouteLocationBase.hash ___ -### matched %{#Properties-matched}% +### matched • **matched**: [`RouteLocationMatched`](RouteLocationMatched.md)[] @@ -52,73 +52,73 @@ cannot contain redirect records either ___ -### meta %{#Properties-meta}% +### meta • **meta**: [`RouteMeta`](RouteMeta.md) Merged `meta` properties from all the matched route records. -#### Inherited from %{#Properties-meta-Inherited-from}% +#### Inherited from \_RouteLocationBase.meta ___ -### name %{#Properties-name}% +### name -• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname) +• **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#RouteRecordName) Name of the matched record -#### Inherited from %{#Properties-name-Inherited-from}% +#### Inherited from \_RouteLocationBase.name ___ -### params %{#Properties-params}% +### params -• **params**: [`RouteParams`](../index.md#routeparams) +• **params**: [`RouteParams`](../index.md#RouteParams) Object of decoded params extracted from the `path`. -#### Inherited from %{#Properties-params-Inherited-from}% +#### Inherited from \_RouteLocationBase.params ___ -### path %{#Properties-path}% +### path • **path**: `string` Percentage encoded pathname section of the URL. -#### Inherited from %{#Properties-path-Inherited-from}% +#### Inherited from \_RouteLocationBase.path ___ -### query %{#Properties-query}% +### query -• **query**: [`LocationQuery`](../index.md#locationquery) +• **query**: [`LocationQuery`](../index.md#LocationQuery) Object representation of the `search` property of the current location. -#### Inherited from %{#Properties-query-Inherited-from}% +#### Inherited from \_RouteLocationBase.query ___ -### redirectedFrom %{#Properties-redirectedFrom}% +### redirectedFrom • **redirectedFrom**: `undefined` \| [`RouteLocation`](RouteLocation.md) Contains the location we were initially trying to access before ending up on the current location. -#### Inherited from %{#Properties-redirectedFrom-Inherited-from}% +#### Inherited from \_RouteLocationBase.redirectedFrom diff --git a/packages/docs/api/interfaces/RouteLocationOptions.md b/packages/docs/api/interfaces/RouteLocationOptions.md index 488dc576..59ece352 100644 --- a/packages/docs/api/interfaces/RouteLocationOptions.md +++ b/packages/docs/api/interfaces/RouteLocationOptions.md @@ -8,9 +8,9 @@ editLink: false Common options for all navigation methods. -## Properties %{#Properties}% +## Properties -### force %{#Properties-force}% +### force • `Optional` **force**: `boolean` @@ -20,7 +20,7 @@ is passed. ___ -### replace %{#Properties-replace}% +### replace • `Optional` **replace**: `boolean` @@ -28,7 +28,7 @@ Replace the entry in the history instead of pushing a new entry ___ -### state %{#Properties-state}% +### state • `Optional` **state**: [`HistoryState`](HistoryState.md) diff --git a/packages/docs/api/interfaces/RouteMeta.md b/packages/docs/api/interfaces/RouteMeta.md index 344ab4ab..03555d71 100644 --- a/packages/docs/api/interfaces/RouteMeta.md +++ b/packages/docs/api/interfaces/RouteMeta.md @@ -21,7 +21,7 @@ declare module 'vue-router' { } ``` -## Hierarchy %{#Hierarchy}% +## Hierarchy - `Record`<`string` \| `number` \| `symbol`, `unknown`\> diff --git a/packages/docs/api/interfaces/RouteRecordBase.md b/packages/docs/api/interfaces/RouteRecordBase.md new file mode 100644 index 00000000..37754cfa --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordBase.md @@ -0,0 +1,149 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / \_RouteRecordBase + +# Interface: \_RouteRecordBase + +Internal type for common properties among all kind of [RouteRecordRaw](../index.md#RouteRecordRaw). + +## Hierarchy + +- [`PathParserOptions`](../index.md#PathParserOptions) + + ↳ **`_RouteRecordBase`** + + ↳↳ [`RouteRecordSingleView`](RouteRecordSingleView.md) + + ↳↳ [`RouteRecordSingleViewWithChildren`](RouteRecordSingleViewWithChildren.md) + + ↳↳ [`RouteRecordMultipleViews`](RouteRecordMultipleViews.md) + + ↳↳ [`RouteRecordMultipleViewsWithChildren`](RouteRecordMultipleViewsWithChildren.md) + + ↳↳ [`RouteRecordRedirect`](RouteRecordRedirect.md) + +## Properties + +### alias + +• `Optional` **alias**: `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. + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +___ + +### children + +• `Optional` **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] + +Array of nested routes. + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +PathParserOptions.end + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +___ + +### props + +• `Optional` **props**: `_RouteRecordProps` \| `Record`<`string`, `_RouteRecordProps`\> + +Allow passing down params as props to the component rendered by `router-view`. + +___ + +### redirect + +• `Optional` **redirect**: `RouteRecordRedirectOption` + +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. + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +PathParserOptions.sensitive + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +PathParserOptions.strict diff --git a/packages/docs/api/interfaces/RouteRecordMultipleViews.md b/packages/docs/api/interfaces/RouteRecordMultipleViews.md new file mode 100644 index 00000000..93f986c5 --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordMultipleViews.md @@ -0,0 +1,187 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / RouteRecordMultipleViews + +# Interface: RouteRecordMultipleViews + +Route Record defining multiple named components with the `components` option. + +## Hierarchy + +- [`_RouteRecordBase`](RouteRecordBase.md) + + ↳ **`RouteRecordMultipleViews`** + +## Properties + +### alias + +• `Optional` **alias**: `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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[alias](RouteRecordBase.md#alias) + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[beforeEnter](RouteRecordBase.md#beforeEnter) + +___ + +### children + +• `Optional` **children**: `undefined` + +Array of nested routes. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[children](RouteRecordBase.md#children) + +___ + +### component + +• `Optional` **component**: `undefined` + +___ + +### components + +• **components**: `Record`<`string`, `RawRouteComponent`\> + +Components to display when the URL matches this route. Allow using named views. + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[end](RouteRecordBase.md#end) + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[meta](RouteRecordBase.md#meta) + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[name](RouteRecordBase.md#name) + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[path](RouteRecordBase.md#path) + +___ + +### props + +• `Optional` **props**: `boolean` \| `Record`<`string`, `_RouteRecordProps`\> + +Allow passing down params as props to the component rendered by +`router-view`. Should be an object with the same keys as `components` or a +boolean to be applied to every component. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[props](RouteRecordBase.md#props) + +___ + +### redirect + +• `Optional` **redirect**: `undefined` + +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. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[redirect](RouteRecordBase.md#redirect) + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[sensitive](RouteRecordBase.md#sensitive) + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[strict](RouteRecordBase.md#strict) diff --git a/packages/docs/api/interfaces/RouteRecordMultipleViewsWithChildren.md b/packages/docs/api/interfaces/RouteRecordMultipleViewsWithChildren.md new file mode 100644 index 00000000..f7f2b235 --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordMultipleViewsWithChildren.md @@ -0,0 +1,187 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / RouteRecordMultipleViewsWithChildren + +# Interface: RouteRecordMultipleViewsWithChildren + +Route Record defining multiple named components with the `components` option and children. + +## Hierarchy + +- [`_RouteRecordBase`](RouteRecordBase.md) + + ↳ **`RouteRecordMultipleViewsWithChildren`** + +## Properties + +### alias + +• `Optional` **alias**: `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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[alias](RouteRecordBase.md#alias) + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[beforeEnter](RouteRecordBase.md#beforeEnter) + +___ + +### children + +• **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] + +Array of nested routes. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[children](RouteRecordBase.md#children) + +___ + +### component + +• `Optional` **component**: `undefined` + +___ + +### components + +• `Optional` **components**: ``null`` \| `Record`<`string`, `RawRouteComponent`\> + +Components to display when the URL matches this route. Allow using named views. + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[end](RouteRecordBase.md#end) + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[meta](RouteRecordBase.md#meta) + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[name](RouteRecordBase.md#name) + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[path](RouteRecordBase.md#path) + +___ + +### props + +• `Optional` **props**: `boolean` \| `Record`<`string`, `_RouteRecordProps`\> + +Allow passing down params as props to the component rendered by +`router-view`. Should be an object with the same keys as `components` or a +boolean to be applied to every component. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[props](RouteRecordBase.md#props) + +___ + +### redirect + +• `Optional` **redirect**: `RouteRecordRedirectOption` + +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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[redirect](RouteRecordBase.md#redirect) + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[sensitive](RouteRecordBase.md#sensitive) + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[strict](RouteRecordBase.md#strict) diff --git a/packages/docs/api/interfaces/RouteRecordNormalized.md b/packages/docs/api/interfaces/RouteRecordNormalized.md index 0e583686..fc7dbb89 100644 --- a/packages/docs/api/interfaces/RouteRecordNormalized.md +++ b/packages/docs/api/interfaces/RouteRecordNormalized.md @@ -6,17 +6,17 @@ editLink: false # Interface: RouteRecordNormalized -Normalized version of a [route record](../index.md#routerecord). +Normalized version of a [route record](../index.md#RouteRecord). -## Hierarchy %{#Hierarchy}% +## Hierarchy - **`RouteRecordNormalized`** ↳ [`RouteLocationMatched`](RouteLocationMatched.md) -## Properties %{#Properties}% +## Properties -### aliasOf %{#Properties-aliasOf}% +### aliasOf • **aliasOf**: `undefined` \| [`RouteRecordNormalized`](RouteRecordNormalized.md) @@ -25,7 +25,7 @@ Defines if this record is the alias of another one. This property is ___ -### beforeEnter %{#Properties-beforeEnter}% +### beforeEnter • **beforeEnter**: `undefined` \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] @@ -33,25 +33,25 @@ Registered beforeEnter guards ___ -### children %{#Properties-children}% +### children -• **children**: [`RouteRecordRaw`](../index.md#routerecordraw)[] +• **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] Nested route records. ___ -### components %{#Properties-components}% +### components • **components**: `undefined` \| ``null`` \| `Record`<`string`, `RawRouteComponent`\> -{@inheritDoc RouteRecordMultipleViews.components} +Components to display when the URL matches this route. Allow using named views. ___ -### instances %{#Properties-instances}% +### instances -• **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\>\> +• **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`\> Mounted route component instances Having the instances on the record mean beforeRouteUpdate and @@ -63,40 +63,45 @@ views. ___ -### meta %{#Properties-meta}% +### meta • **meta**: [`RouteMeta`](RouteMeta.md) -{@inheritDoc _RouteRecordBase.meta} +Arbitrary data attached to the record. ___ -### name %{#Properties-name}% +### name -• **name**: `undefined` \| [`RouteRecordName`](../index.md#routerecordname) +• **name**: `undefined` \| [`RouteRecordName`](../index.md#RouteRecordName) -{@inheritDoc _RouteRecordBase.name} +Name for the route record. Must be unique. ___ -### path %{#Properties-path}% +### path • **path**: `string` -{@inheritDoc _RouteRecordBase.path} +Path of the record. Should start with `/` unless the record is the child of +another record. ___ -### props %{#Properties-props}% +### props • **props**: `Record`<`string`, `_RouteRecordProps`\> -{@inheritDoc RouteRecordMultipleViews.props} +Allow passing down params as props to the component rendered by +`router-view`. Should be an object with the same keys as `components` or a +boolean to be applied to every component. ___ -### redirect %{#Properties-redirect}% +### redirect • **redirect**: `undefined` \| `RouteRecordRedirectOption` -{@inheritDoc _RouteRecordBase.redirect} +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. diff --git a/packages/docs/api/interfaces/RouteRecordRedirect.md b/packages/docs/api/interfaces/RouteRecordRedirect.md new file mode 100644 index 00000000..5e1496f6 --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordRedirect.md @@ -0,0 +1,184 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / RouteRecordRedirect + +# Interface: RouteRecordRedirect + +Route Record that defines a redirect. Cannot have `component` or `components` +as it is never rendered. + +## Hierarchy + +- [`_RouteRecordBase`](RouteRecordBase.md) + + ↳ **`RouteRecordRedirect`** + +## Properties + +### alias + +• `Optional` **alias**: `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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[alias](RouteRecordBase.md#alias) + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[beforeEnter](RouteRecordBase.md#beforeEnter) + +___ + +### children + +• `Optional` **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] + +Array of nested routes. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[children](RouteRecordBase.md#children) + +___ + +### component + +• `Optional` **component**: `undefined` + +___ + +### components + +• `Optional` **components**: `undefined` + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[end](RouteRecordBase.md#end) + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[meta](RouteRecordBase.md#meta) + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[name](RouteRecordBase.md#name) + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[path](RouteRecordBase.md#path) + +___ + +### props + +• `Optional` **props**: `undefined` + +Allow passing down params as props to the component rendered by `router-view`. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[props](RouteRecordBase.md#props) + +___ + +### redirect + +• **redirect**: `RouteRecordRedirectOption` + +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. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[redirect](RouteRecordBase.md#redirect) + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[sensitive](RouteRecordBase.md#sensitive) + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[strict](RouteRecordBase.md#strict) diff --git a/packages/docs/api/interfaces/RouteRecordSingleView.md b/packages/docs/api/interfaces/RouteRecordSingleView.md new file mode 100644 index 00000000..3bbb68a6 --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordSingleView.md @@ -0,0 +1,185 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / RouteRecordSingleView + +# Interface: RouteRecordSingleView + +Route Record defining one single component with the `component` option. + +## Hierarchy + +- [`_RouteRecordBase`](RouteRecordBase.md) + + ↳ **`RouteRecordSingleView`** + +## Properties + +### alias + +• `Optional` **alias**: `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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[alias](RouteRecordBase.md#alias) + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[beforeEnter](RouteRecordBase.md#beforeEnter) + +___ + +### children + +• `Optional` **children**: `undefined` + +Array of nested routes. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[children](RouteRecordBase.md#children) + +___ + +### component + +• **component**: `RawRouteComponent` + +Component to display when the URL matches this route. + +___ + +### components + +• `Optional` **components**: `undefined` + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[end](RouteRecordBase.md#end) + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[meta](RouteRecordBase.md#meta) + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[name](RouteRecordBase.md#name) + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[path](RouteRecordBase.md#path) + +___ + +### props + +• `Optional` **props**: `_RouteRecordProps` + +Allow passing down params as props to the component rendered by `router-view`. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[props](RouteRecordBase.md#props) + +___ + +### redirect + +• `Optional` **redirect**: `undefined` + +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. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[redirect](RouteRecordBase.md#redirect) + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[sensitive](RouteRecordBase.md#sensitive) + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[strict](RouteRecordBase.md#strict) diff --git a/packages/docs/api/interfaces/RouteRecordSingleViewWithChildren.md b/packages/docs/api/interfaces/RouteRecordSingleViewWithChildren.md new file mode 100644 index 00000000..67b490cf --- /dev/null +++ b/packages/docs/api/interfaces/RouteRecordSingleViewWithChildren.md @@ -0,0 +1,185 @@ +--- +editLink: false +--- + +[API Documentation](../index.md) / RouteRecordSingleViewWithChildren + +# Interface: RouteRecordSingleViewWithChildren + +Route Record defining one single component with a nested view. + +## Hierarchy + +- [`_RouteRecordBase`](RouteRecordBase.md) + + ↳ **`RouteRecordSingleViewWithChildren`** + +## Properties + +### alias + +• `Optional` **alias**: `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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[alias](RouteRecordBase.md#alias) + +___ + +### beforeEnter + +• `Optional` **beforeEnter**: [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[] + +Before Enter guard specific to this record. Note `beforeEnter` has no +effect if the record has a `redirect` property. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[beforeEnter](RouteRecordBase.md#beforeEnter) + +___ + +### children + +• **children**: [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] + +Array of nested routes. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[children](RouteRecordBase.md#children) + +___ + +### component + +• `Optional` **component**: ``null`` \| `RawRouteComponent` + +Component to display when the URL matches this route. + +___ + +### components + +• `Optional` **components**: `undefined` + +___ + +### end + +• `Optional` **end**: `boolean` + +Should the RegExp match until the end by appending a `$` to it. + +**`Default Value`** + +`true` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[end](RouteRecordBase.md#end) + +___ + +### meta + +• `Optional` **meta**: [`RouteMeta`](RouteMeta.md) + +Arbitrary data attached to the record. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[meta](RouteRecordBase.md#meta) + +___ + +### name + +• `Optional` **name**: [`RouteRecordName`](../index.md#RouteRecordName) + +Name for the route record. Must be unique. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[name](RouteRecordBase.md#name) + +___ + +### path + +• **path**: `string` + +Path of the record. Should start with `/` unless the record is the child of +another record. + +**`Example`** + +```ts +`/users/:id` matches `/users/1` as well as `/users/posva`. +``` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[path](RouteRecordBase.md#path) + +___ + +### props + +• `Optional` **props**: `_RouteRecordProps` + +Allow passing down params as props to the component rendered by `router-view`. + +#### Overrides + +[_RouteRecordBase](RouteRecordBase.md).[props](RouteRecordBase.md#props) + +___ + +### redirect + +• `Optional` **redirect**: `RouteRecordRedirectOption` + +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. + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[redirect](RouteRecordBase.md#redirect) + +___ + +### sensitive + +• `Optional` **sensitive**: `boolean` + +Makes the RegExp case-sensitive. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[sensitive](RouteRecordBase.md#sensitive) + +___ + +### strict + +• `Optional` **strict**: `boolean` + +Whether to disallow a trailing slash or not. + +**`Default Value`** + +`false` + +#### Inherited from + +[_RouteRecordBase](RouteRecordBase.md).[strict](RouteRecordBase.md#strict) diff --git a/packages/docs/api/interfaces/Router.md b/packages/docs/api/interfaces/Router.md index baec77e9..0c8d92e2 100644 --- a/packages/docs/api/interfaces/Router.md +++ b/packages/docs/api/interfaces/Router.md @@ -8,9 +8,9 @@ editLink: false Router instance. -## Properties %{#Properties}% +## Properties -### currentRoute %{#Properties-currentRoute}% +### currentRoute • `Readonly` **currentRoute**: `Ref`<[`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md)\> @@ -18,7 +18,7 @@ Current [RouteLocationNormalized](RouteLocationNormalized.md) ___ -### listening %{#Properties-listening}% +### listening • **listening**: `boolean` @@ -26,87 +26,77 @@ Allows turning off the listening of history events. This is a low level api for ___ -### options %{#Properties-options}% +### options • `Readonly` **options**: [`RouterOptions`](RouterOptions.md) Original options object passed to create the Router -## Methods %{#Methods}% +## Methods -### addRoute %{#Methods-addRoute}% +### addRoute ▸ **addRoute**(`parentName`, `route`): () => `void` -Add a new [route record](../index.md#routerecordraw) as the child of an existing route. +Add a new [route record](../index.md#RouteRecordRaw) as the child of an existing route. -#### Parameters %{#Methods-addRoute-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `parentName` | [`RouteRecordName`](../index.md#routerecordname) | Parent Route Record where `route` should be appended at | -| `route` | [`RouteRecordRaw`](../index.md#routerecordraw) | Route Record to add | +| `parentName` | [`RouteRecordName`](../index.md#RouteRecordName) | Parent Route Record where `route` should be appended at | +| `route` | [`RouteRecordRaw`](../index.md#RouteRecordRaw) | Route Record to add | -#### Returns %{#Methods-addRoute-Returns}% +#### Returns `fn` ▸ (): `void` -Add a new [route record](../index.md#routerecordraw) as the child of an existing route. +Add a new [route record](../index.md#RouteRecordRaw) as the child of an existing route. -##### Returns %{#Methods-addRoute-Returns-Returns}% +##### Returns `void` ▸ **addRoute**(`route`): () => `void` -Add a new [route record](../index.md#routerecordraw) to the router. +Add a new [route record](../index.md#RouteRecordRaw) to the router. -#### Parameters %{#Methods-addRoute-Parameters_1}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `route` | [`RouteRecordRaw`](../index.md#routerecordraw) | Route Record to add | +| `route` | [`RouteRecordRaw`](../index.md#RouteRecordRaw) | Route Record to add | -#### Returns %{#Methods-addRoute-Returns_1}% +#### Returns `fn` ▸ (): `void` -Add a new [route record](../index.md#routerecordraw) to the router. +Add a new [route record](../index.md#RouteRecordRaw) to the router. -##### Returns %{#Methods-addRoute-Returns-Returns_1}% +##### Returns `void` ___ -### afterEach %{#Methods-afterEach}% +### afterEach ▸ **afterEach**(`guard`): () => `void` Add a navigation hook that is executed after every navigation. Returns a function that removes the registered hook. -**`Example`** - -```js -router.afterEach((to, from, failure) => { - if (isNavigationFailure(failure)) { - console.log('failed navigation', failure) - } -}) -``` - -#### Parameters %{#Methods-afterEach-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `guard` | [`NavigationHookAfter`](NavigationHookAfter.md) | navigation hook to add | -#### Returns %{#Methods-afterEach-Returns}% +#### Returns `fn` @@ -115,6 +105,10 @@ router.afterEach((to, from, failure) => { Add a navigation hook that is executed after every navigation. Returns a function that removes the registered hook. +##### Returns + +`void` + **`Example`** ```js @@ -125,39 +119,45 @@ router.afterEach((to, from, failure) => { }) ``` -##### Returns %{#Methods-afterEach-Returns-Returns}% +**`Example`** -`void` +```js +router.afterEach((to, from, failure) => { + if (isNavigationFailure(failure)) { + console.log('failed navigation', failure) + } +}) +``` ___ -### back %{#Methods-back}% +### back ▸ **back**(): `void` Go back in history if possible by calling `history.back()`. Equivalent to `router.go(-1)`. -#### Returns %{#Methods-back-Returns}% +#### Returns `void` ___ -### beforeEach %{#Methods-beforeEach}% +### beforeEach ▸ **beforeEach**(`guard`): () => `void` Add a navigation guard that executes before any navigation. Returns a function that removes the registered guard. -#### Parameters %{#Methods-beforeEach-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `guard` | [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> | navigation guard to add | -#### Returns %{#Methods-beforeEach-Returns}% +#### Returns `fn` @@ -166,13 +166,13 @@ function that removes the registered guard. Add a navigation guard that executes before any navigation. Returns a function that removes the registered guard. -##### Returns %{#Methods-beforeEach-Returns-Returns}% +##### Returns `void` ___ -### beforeResolve %{#Methods-beforeResolve}% +### beforeResolve ▸ **beforeResolve**(`guard`): () => `void` @@ -181,21 +181,13 @@ resolved. At this state all component have been fetched and other navigation guards have been successful. Returns a function that removes the registered guard. -**`Example`** - -```js -router.beforeResolve(to => { - if (to.meta.requiresAuth && !isAuthenticated) return false -}) -``` - -#### Parameters %{#Methods-beforeResolve-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `guard` | [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> | navigation guard to add | -#### Returns %{#Methods-beforeResolve-Returns}% +#### Returns `fn` @@ -206,6 +198,10 @@ resolved. At this state all component have been fetched and other navigation guards have been successful. Returns a function that removes the registered guard. +##### Returns + +`void` + **`Example`** ```js @@ -214,75 +210,79 @@ router.beforeResolve(to => { }) ``` -##### Returns %{#Methods-beforeResolve-Returns-Returns}% +**`Example`** -`void` +```js +router.beforeResolve(to => { + if (to.meta.requiresAuth && !isAuthenticated) return false +}) +``` ___ -### forward %{#Methods-forward}% +### forward ▸ **forward**(): `void` Go forward in history if possible by calling `history.forward()`. Equivalent to `router.go(1)`. -#### Returns %{#Methods-forward-Returns}% +#### Returns `void` ___ -### getRoutes %{#Methods-getRoutes}% +### getRoutes ▸ **getRoutes**(): [`RouteRecordNormalized`](RouteRecordNormalized.md)[] -Get a full list of all the [route records](../index.md#routerecord). +Get a full list of all the [route records](../index.md#RouteRecord). -#### Returns %{#Methods-getRoutes-Returns}% +#### Returns [`RouteRecordNormalized`](RouteRecordNormalized.md)[] ___ -### go %{#Methods-go}% +### go ▸ **go**(`delta`): `void` Allows you to move forward or backward through the history. Calls `history.go()`. -#### Parameters %{#Methods-go-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `delta` | `number` | The position in the history to which you want to move, relative to the current page | -#### Returns %{#Methods-go-Returns}% +#### Returns `void` ___ -### hasRoute %{#Methods-hasRoute}% +### hasRoute ▸ **hasRoute**(`name`): `boolean` Checks if a route with a given name exists -#### Parameters %{#Methods-hasRoute-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `name` | [`RouteRecordName`](../index.md#routerecordname) | Name of the route to check | +| `name` | [`RouteRecordName`](../index.md#RouteRecordName) | Name of the route to check | -#### Returns %{#Methods-hasRoute-Returns}% +#### Returns `boolean` ___ -### isReady %{#Methods-isReady}% +### isReady ▸ **isReady**(): `Promise`<`void`\> @@ -296,13 +296,13 @@ the server and the client. Note that on server side, you need to manually push the initial location while on client side, the router automatically picks it up from the URL. -#### Returns %{#Methods-isReady-Returns}% +#### Returns `Promise`<`void`\> ___ -### onError %{#Methods-onError}% +### onError ▸ **onError**(`handler`): () => `void` @@ -312,13 +312,13 @@ asynchronously, errors returned or passed to `next` in any navigation guard, and errors occurred when trying to resolve an async component that is required to render a route. -#### Parameters %{#Methods-onError-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `handler` | `_ErrorHandler` | error handler to register | +| `handler` | `_ErrorListener` | error handler to register | -#### Returns %{#Methods-onError-Returns}% +#### Returns `fn` @@ -330,84 +330,84 @@ asynchronously, errors returned or passed to `next` in any navigation guard, and errors occurred when trying to resolve an async component that is required to render a route. -##### Returns %{#Methods-onError-Returns-Returns}% +##### Returns `void` ___ -### push %{#Methods-push}% +### push ▸ **push**(`to`): `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\> Programmatically navigate to a new URL by pushing an entry in the history stack. -#### Parameters %{#Methods-push-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | Route location to navigate to | +| `to` | [`RouteLocationRaw`](../index.md#RouteLocationRaw) | Route location to navigate to | -#### Returns %{#Methods-push-Returns}% +#### Returns `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\> ___ -### removeRoute %{#Methods-removeRoute}% +### removeRoute ▸ **removeRoute**(`name`): `void` Remove an existing route by its name. -#### Parameters %{#Methods-removeRoute-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `name` | [`RouteRecordName`](../index.md#routerecordname) | Name of the route to remove | +| `name` | [`RouteRecordName`](../index.md#RouteRecordName) | Name of the route to remove | -#### Returns %{#Methods-removeRoute-Returns}% +#### Returns `void` ___ -### replace %{#Methods-replace}% +### replace ▸ **replace**(`to`): `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\> Programmatically navigate to a new URL by replacing the current entry in the history stack. -#### Parameters %{#Methods-replace-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | Route location to navigate to | +| `to` | [`RouteLocationRaw`](../index.md#RouteLocationRaw) | Route location to navigate to | -#### Returns %{#Methods-replace-Returns}% +#### Returns `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\> ___ -### resolve %{#Methods-resolve}% +### resolve ▸ **resolve**(`to`, `currentLocation?`): [`RouteLocation`](RouteLocation.md) & { `href`: `string` } Returns the [normalized version](RouteLocation.md) of a -[route location](../index.md#routelocationraw). Also includes an `href` property +[route location](../index.md#RouteLocationRaw). Also includes an `href` property that includes any existing `base`. By default, the `currentLocation` used is `router.currentRoute` and should only be overridden in advanced use cases. -#### Parameters %{#Methods-resolve-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | Raw route location to resolve | +| `to` | [`RouteLocationRaw`](../index.md#RouteLocationRaw) | Raw route location to resolve | | `currentLocation?` | [`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md) | Optional current location to resolve against | -#### Returns %{#Methods-resolve-Returns}% +#### Returns [`RouteLocation`](RouteLocation.md) & { `href`: `string` } diff --git a/packages/docs/api/interfaces/RouterHistory.md b/packages/docs/api/interfaces/RouterHistory.md index 7349c181..6f9e2484 100644 --- a/packages/docs/api/interfaces/RouterHistory.md +++ b/packages/docs/api/interfaces/RouterHistory.md @@ -9,9 +9,9 @@ editLink: false Interface implemented by History implementations that can be passed to the router as Router.history -## Properties %{#Properties}% +## Properties -### base %{#Properties-base}% +### base • `Readonly` **base**: `string` @@ -21,7 +21,7 @@ sub-folder of a domain like `example.com/sub-folder` by having a `base` of ___ -### location %{#Properties-location}% +### location • `Readonly` **location**: `string` @@ -29,71 +29,71 @@ Current History location ___ -### state %{#Properties-state}% +### state • `Readonly` **state**: [`HistoryState`](HistoryState.md) Current History state -## Methods %{#Methods}% +## Methods -### createHref %{#Methods-createHref}% +### createHref ▸ **createHref**(`location`): `string` Generates the corresponding href to be used in an anchor tag. -#### Parameters %{#Methods-createHref-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `location` | `string` | history location that should create an href | -#### Returns %{#Methods-createHref-Returns}% +#### Returns `string` ___ -### destroy %{#Methods-destroy}% +### destroy ▸ **destroy**(): `void` Clears any event listener attached by the history implementation. -#### Returns %{#Methods-destroy-Returns}% +#### Returns `void` ___ -### go %{#Methods-go}% +### go ▸ **go**(`delta`, `triggerListeners?`): `void` Traverses history in a given direction. -**`Example`** - -```js -myHistory.go(-1) // equivalent to window.history.back() -myHistory.go(1) // equivalent to window.history.forward() -``` - -#### Parameters %{#Methods-go-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `delta` | `number` | distance to travel. If delta is \< 0, it will go back, if it's \> 0, it will go forward by that amount of entries. | | `triggerListeners?` | `boolean` | whether this should trigger listeners attached to the history | -#### Returns %{#Methods-go-Returns}% +#### Returns `void` +**`Example`** + +```js +myHistory.go(-1) // equivalent to window.history.back() +myHistory.go(1) // equivalent to window.history.forward() +``` + ___ -### listen %{#Methods-listen}% +### listen ▸ **listen**(`callback`): () => `void` @@ -102,13 +102,13 @@ navigation is triggered from outside (like the Browser back and forward buttons) or when passing `true` to RouterHistory.back and RouterHistory.forward -#### Parameters %{#Methods-listen-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `callback` | `NavigationCallback` | listener to attach | -#### Returns %{#Methods-listen-Returns}% +#### Returns `fn` @@ -121,7 +121,7 @@ navigation is triggered from outside (like the Browser back and forward buttons) or when passing `true` to RouterHistory.back and RouterHistory.forward -##### Returns %{#Methods-listen-Returns-Returns}% +##### Returns `void` @@ -129,40 +129,40 @@ a callback to remove the listener ___ -### push %{#Methods-push}% +### push ▸ **push**(`to`, `data?`): `void` Navigates to a location. In the case of an HTML5 History implementation, this will call `history.pushState` to effectively change the URL. -#### Parameters %{#Methods-push-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `to` | `string` | location to push | | `data?` | [`HistoryState`](HistoryState.md) | optional [HistoryState](HistoryState.md) to be associated with the navigation entry | -#### Returns %{#Methods-push-Returns}% +#### Returns `void` ___ -### replace %{#Methods-replace}% +### replace ▸ **replace**(`to`, `data?`): `void` Same as [push](RouterHistory.md#push) but performs a `history.replaceState` instead of `history.pushState` -#### Parameters %{#Methods-replace-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | | `to` | `string` | location to set | | `data?` | [`HistoryState`](HistoryState.md) | optional [HistoryState](HistoryState.md) to be associated with the navigation entry | -#### Returns %{#Methods-replace-Returns}% +#### Returns `void` diff --git a/packages/docs/api/interfaces/RouterLinkProps.md b/packages/docs/api/interfaces/RouterLinkProps.md index af43373d..e8aa8778 100644 --- a/packages/docs/api/interfaces/RouterLinkProps.md +++ b/packages/docs/api/interfaces/RouterLinkProps.md @@ -6,15 +6,15 @@ editLink: false # Interface: RouterLinkProps -## Hierarchy %{#Hierarchy}% +## Hierarchy - `RouterLinkOptions` ↳ **`RouterLinkProps`** -## Properties %{#Properties}% +## Properties -### activeClass %{#Properties-activeClass}% +### activeClass • `Optional` **activeClass**: `string` @@ -22,7 +22,7 @@ Class to apply when the link is active ___ -### ariaCurrentValue %{#Properties-ariaCurrentValue}% +### ariaCurrentValue • `Optional` **ariaCurrentValue**: ``"location"`` \| ``"time"`` \| ``"page"`` \| ``"step"`` \| ``"date"`` \| ``"true"`` \| ``"false"`` @@ -34,7 +34,7 @@ Value passed to the attribute `aria-current` when the link is exact active. ___ -### custom %{#Properties-custom}% +### custom • `Optional` **custom**: `boolean` @@ -43,7 +43,7 @@ using `v-slot` to create a custom RouterLink ___ -### exactActiveClass %{#Properties-exactActiveClass}% +### exactActiveClass • `Optional` **exactActiveClass**: `string` @@ -51,24 +51,24 @@ Class to apply when the link is exact active ___ -### replace %{#Properties-replace}% +### replace • `Optional` **replace**: `boolean` Calls `router.replace` instead of `router.push`. -#### Inherited from %{#Properties-replace-Inherited-from}% +#### Inherited from RouterLinkOptions.replace ___ -### to %{#Properties-to}% +### to -• **to**: [`RouteLocationRaw`](../index.md#routelocationraw) +• **to**: [`RouteLocationRaw`](../index.md#RouteLocationRaw) Route Location the link should navigate to when clicked on. -#### Inherited from %{#Properties-to-Inherited-from}% +#### Inherited from RouterLinkOptions.to diff --git a/packages/docs/api/interfaces/RouterOptions.md b/packages/docs/api/interfaces/RouterOptions.md index 2779cb0b..43548e2c 100644 --- a/packages/docs/api/interfaces/RouterOptions.md +++ b/packages/docs/api/interfaces/RouterOptions.md @@ -8,15 +8,15 @@ editLink: false Options to initialize a [Router](Router.md) instance. -## Hierarchy %{#Hierarchy}% +## Hierarchy -- [`PathParserOptions`](../index.md#pathparseroptions) +- [`PathParserOptions`](../index.md#PathParserOptions) ↳ **`RouterOptions`** -## Properties %{#Properties}% +## Properties -### end %{#Properties-end}% +### end • `Optional` **end**: `boolean` @@ -26,13 +26,13 @@ Should the RegExp match until the end by appending a `$` to it. `true` -#### Inherited from %{#Properties-end-Inherited-from}% +#### Inherited from PathParserOptions.end ___ -### history %{#Properties-history}% +### history • **history**: [`RouterHistory`](RouterHistory.md) @@ -53,34 +53,44 @@ createRouter({ ___ -### linkActiveClass %{#Properties-linkActiveClass}% +### linkActiveClass • `Optional` **linkActiveClass**: `string` -Default class applied to active [RouterLink](../index.md#routerlink). If none is provided, +Default class applied to active [RouterLink](../index.md#RouterLink). If none is provided, `router-link-active` will be applied. ___ -### linkExactActiveClass %{#Properties-linkExactActiveClass}% +### linkExactActiveClass • `Optional` **linkExactActiveClass**: `string` -Default class applied to exact active [RouterLink](../index.md#routerlink). If none is provided, +Default class applied to exact active [RouterLink](../index.md#RouterLink). If none is provided, `router-link-exact-active` will be applied. ___ -### parseQuery %{#Properties-parseQuery}% +### parseQuery -• `Optional` **parseQuery**: (`search`: `string`) => [`LocationQuery`](../index.md#locationquery) +• `Optional` **parseQuery**: (`search`: `string`) => [`LocationQuery`](../index.md#LocationQuery) -#### Type declaration %{#Properties-parseQuery-Type-declaration}% +#### Type declaration -▸ (`search`): [`LocationQuery`](../index.md#locationquery) +▸ (`search`): [`LocationQuery`](../index.md#LocationQuery) Custom implementation to parse a query. See its counterpart, -[stringifyQuery](RouterOptions.md#stringifyquery). +[stringifyQuery](RouterOptions.md#stringifyQuery). + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `search` | `string` | + +##### Returns + +[`LocationQuery`](../index.md#LocationQuery) **`Example`** @@ -96,27 +106,17 @@ createRouter({ }) ``` -##### Parameters %{#Properties-parseQuery-Type-declaration-Parameters}% - -| Name | Type | -| :------ | :------ | -| `search` | `string` | - -##### Returns %{#Properties-parseQuery-Type-declaration-Returns}% - -[`LocationQuery`](../index.md#locationquery) - ___ -### routes %{#Properties-routes}% +### routes -• **routes**: readonly [`RouteRecordRaw`](../index.md#routerecordraw)[] +• **routes**: readonly [`RouteRecordRaw`](../index.md#RouteRecordRaw)[] Initial list of routes that should be added to the router. ___ -### scrollBehavior %{#Properties-scrollBehavior}% +### scrollBehavior • `Optional` **scrollBehavior**: [`RouterScrollBehavior`](RouterScrollBehavior.md) @@ -134,7 +134,7 @@ function scrollBehavior(to, from, savedPosition) { ___ -### sensitive %{#Properties-sensitive}% +### sensitive • `Optional` **sensitive**: `boolean` @@ -144,13 +144,13 @@ Makes the RegExp case-sensitive. `false` -#### Inherited from %{#Properties-sensitive-Inherited-from}% +#### Inherited from PathParserOptions.sensitive ___ -### strict %{#Properties-strict}% +### strict • `Optional` **strict**: `boolean` @@ -160,29 +160,29 @@ Whether to disallow a trailing slash or not. `false` -#### Inherited from %{#Properties-strict-Inherited-from}% +#### Inherited from PathParserOptions.strict ___ -### stringifyQuery %{#Properties-stringifyQuery}% +### stringifyQuery -• `Optional` **stringifyQuery**: (`query`: [`LocationQueryRaw`](../index.md#locationqueryraw)) => `string` +• `Optional` **stringifyQuery**: (`query`: [`LocationQueryRaw`](../index.md#LocationQueryRaw)) => `string` -#### Type declaration %{#Properties-stringifyQuery-Type-declaration}% +#### Type declaration ▸ (`query`): `string` Custom implementation to stringify a query object. Should not prepend a leading `?`. -[parseQuery](RouterOptions.md#parsequery) counterpart to handle query parsing. +[parseQuery](RouterOptions.md#parseQuery) counterpart to handle query parsing. -##### Parameters %{#Properties-stringifyQuery-Type-declaration-Parameters}% +##### Parameters | Name | Type | | :------ | :------ | -| `query` | [`LocationQueryRaw`](../index.md#locationqueryraw) | +| `query` | [`LocationQueryRaw`](../index.md#LocationQueryRaw) | -##### Returns %{#Properties-stringifyQuery-Type-declaration-Returns}% +##### Returns `string` diff --git a/packages/docs/api/interfaces/RouterScrollBehavior.md b/packages/docs/api/interfaces/RouterScrollBehavior.md index 134b1454..b85e0777 100644 --- a/packages/docs/api/interfaces/RouterScrollBehavior.md +++ b/packages/docs/api/interfaces/RouterScrollBehavior.md @@ -8,13 +8,13 @@ editLink: false Type of the `scrollBehavior` option that can be passed to `createRouter`. -## Callable %{#Callable}% +## Callable -### RouterScrollBehavior %{#Callable-RouterScrollBehavior}% +### RouterScrollBehavior ▸ **RouterScrollBehavior**(`to`, `from`, `savedPosition`): `Awaitable`<``false`` \| `void` \| `ScrollPosition`\> -#### Parameters %{#Callable-RouterScrollBehavior-Parameters}% +#### Parameters | Name | Type | Description | | :------ | :------ | :------ | @@ -22,6 +22,6 @@ Type of the `scrollBehavior` option that can be passed to `createRouter`. | `from` | [`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md) | Route location where we are navigating from | | `savedPosition` | ``null`` \| `_ScrollPositionNormalized` | saved position if it exists, `null` otherwise | -#### Returns %{#Callable-RouterScrollBehavior-Returns}% +#### Returns `Awaitable`<``false`` \| `void` \| `ScrollPosition`\> diff --git a/packages/docs/api/interfaces/RouterViewProps.md b/packages/docs/api/interfaces/RouterViewProps.md index e5c8034a..30fc957d 100644 --- a/packages/docs/api/interfaces/RouterViewProps.md +++ b/packages/docs/api/interfaces/RouterViewProps.md @@ -6,14 +6,14 @@ editLink: false # Interface: RouterViewProps -## Properties %{#Properties}% +## Properties -### name %{#Properties-name}% +### name • `Optional` **name**: `string` ___ -### route %{#Properties-route}% +### route • `Optional` **route**: [`RouteLocationNormalized`](RouteLocationNormalized.md) -- 2.47.2