@@ -20,37 +20,43 @@ API 文档
2020- [ RouteLocationNormalizedLoaded] ( interfaces/RouteLocationNormalizedLoaded.md )
2121- [ RouteLocationOptions] ( interfaces/RouteLocationOptions.md )
2222- [ RouteMeta] ( interfaces/RouteMeta.md )
23+ - [ RouteRecordMultipleViews] ( interfaces/RouteRecordMultipleViews.md )
24+ - [ RouteRecordMultipleViewsWithChildren] ( interfaces/RouteRecordMultipleViewsWithChildren.md )
2325- [ RouteRecordNormalized] ( interfaces/RouteRecordNormalized.md )
26+ - [ RouteRecordRedirect] ( interfaces/RouteRecordRedirect.md )
27+ - [ RouteRecordSingleView] ( interfaces/RouteRecordSingleView.md )
28+ - [ RouteRecordSingleViewWithChildren] ( interfaces/RouteRecordSingleViewWithChildren.md )
2429- [ Router] ( interfaces/Router.md )
2530- [ RouterHistory] ( interfaces/RouterHistory.md )
2631- [ RouterLinkProps] ( interfaces/RouterLinkProps.md )
2732- [ RouterOptions] ( interfaces/RouterOptions.md )
2833- [ RouterScrollBehavior] ( interfaces/RouterScrollBehavior.md )
2934- [ RouterViewProps] ( interfaces/RouterViewProps.md )
35+ - [ \_ RouteRecordBase] ( interfaces/RouteRecordBase.md )
3036
3137## TS 类型别名 %{#Type-Aliases}%
3238
3339### LocationQuery %{#Type-Aliases-LocationQuery}%
3440
35- Ƭ ** LocationQuery** : ` Record ` <` string ` , ` LocationQueryValue ` \| ` LocationQueryValue ` [ ] \>
41+ Ƭ ** LocationQuery** : ` Record ` \ <` string ` , ` LocationQueryValue ` \| ` LocationQueryValue ` [ ] \>
3642
3743出现在 [ RouteLocationNormalized] ( interfaces/RouteLocationNormalized.md ) 中的规范化查询对象。
3844
3945___
4046
4147### LocationQueryRaw %{#Type-Aliases-LocationQueryRaw}%
4248
43- Ƭ ** LocationQueryRaw** : ` Record ` <` string ` \| ` number ` , ` LocationQueryValueRaw ` \| ` LocationQueryValueRaw ` [ ] \>
49+ Ƭ ** LocationQueryRaw** : ` Record ` \ <` string ` \| ` number ` , ` LocationQueryValueRaw ` \| ` LocationQueryValueRaw ` [ ] \>
4450
4551松散的 [ LocationQuery] ( index.md#locationquery ) 对象,可以被传递给诸如
46- [ push] ( interfaces/Router.md#push ) 、[ replace] ( interfaces/Router.md#replace ) 或任何创建
52+ [ Router. push] ( interfaces/Router.md#push ) 、[ Router. replace] ( interfaces/Router.md#replace ) 或任何创建
4753[ RouteLocationRaw] ( index.md#routelocationraw ) 的函数。
4854
4955___
5056
5157### PathParserOptions %{#Type-Aliases-PathParserOptions}%
5258
53- Ƭ ** PathParserOptions** : ` Pick ` <` _PathParserOptions ` , `` "end" `` \| `` "sensitive" `` \| `` "strict" `` \>
59+ Ƭ ** PathParserOptions** : ` Pick ` \ <` _PathParserOptions ` , `` "end" `` \| `` "sensitive" `` \| `` "strict" `` \>
5460
5561___
5662
7278
7379### RouteParams %{#Type-Aliases-RouteParams}%
7480
75- Ƭ ** RouteParams** : ` Record ` <` string ` , ` RouteParamValue ` \| ` RouteParamValue ` [ ] \>
81+ Ƭ ** RouteParams** : ` Record ` \ <` string ` , ` RouteParamValue ` \| ` RouteParamValue ` [ ] \>
7682
7783___
7884
7985### RouteParamsRaw %{#Type-Aliases-RouteParamsRaw}%
8086
81- Ƭ ** RouteParamsRaw** : ` Record ` <` string ` , ` RouteParamValueRaw ` \| ` Exclude ` <` RouteParamValueRaw ` , `` null `` \| ` undefined ` \> [ ] \>
87+ Ƭ ** RouteParamsRaw** : ` Record ` \ <` string ` , ` RouteParamValueRaw ` \| ` Exclude ` \ <` RouteParamValueRaw ` , `` null `` \| ` undefined ` \> [ ] \>
8288
8389___
8490
@@ -100,13 +106,13 @@ ___
100106
101107### RouteRecordRaw %{#Type-Aliases-RouteRecordRaw}%
102108
103- Ƭ ** RouteRecordRaw** : ` RouteRecordSingleView ` \| ` RouteRecordSingleViewWithChildren ` \| ` RouteRecordMultipleViews ` \| ` RouteRecordMultipleViewsWithChildren ` \| ` RouteRecordRedirect `
109+ Ƭ ** RouteRecordRaw** : [ ` RouteRecordSingleView ` ] ( interfaces/RouteRecordSingleView.md ) \| [ ` RouteRecordSingleViewWithChildren ` ] ( interfaces/RouteRecordSingleViewWithChildren.md ) \| [ ` RouteRecordMultipleViews ` ] ( interfaces/RouteRecordMultipleViews.md ) \| [ ` RouteRecordMultipleViewsWithChildren ` ] ( interfaces/RouteRecordMultipleViewsWithChildren.md ) \| [ ` RouteRecordRedirect ` ] ( interfaces/RouteRecordRedirect.md )
104110
105111___
106112
107113### UseLinkOptions %{#Type-Aliases-UseLinkOptions}%
108114
109- Ƭ ** UseLinkOptions** : ` VueUseOptions ` <` RouterLinkOptions ` \>
115+ Ƭ ** UseLinkOptions** : ` VueUseOptions ` \ <` RouterLinkOptions ` \>
110116
111117## 变量 %{#Variables}%
112118
@@ -120,14 +126,24 @@ ___
120126
121127### RouterView %{#Variables-RouterView}%
122128
123- • ` 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 ` ; }\> [ ] } }
129+ • ` 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 ` ; }\> [ ] } }
124130
125131#### 类型声明 %{#Variables-RouterView-Type-declaration}%
126132
127- • ** new RouterView** ()
133+ • ** new RouterView** (): ` Object `
128134
129135用于显示用户当前所处路由的组件。
130136
137+ ##### 返回值 %{#Variables-RouterView-Returns}%
138+
139+ ` Object `
140+
141+ | 名称 | 类型 |
142+ | :------ | :------ |
143+ | ` $props ` | ` AllowedComponentProps ` & ` ComponentCustomProps ` & ` VNodeProps ` & [ ` RouterViewProps ` ] ( interfaces/RouterViewProps.md ) |
144+ | ` $slots ` | \{ ` default? ` : (` __namedParameters ` : \{ ` Component ` : ` VNode ` \< ` RendererNode ` , ` RendererElement ` , \{ ` [key: string] ` : ` any ` ; }\> ; ` route ` : [ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) }) => ` VNode ` \< ` RendererNode ` , ` RendererElement ` , \{ ` [key: string] ` : ` any ` ; }\> [ ] } |
145+ | ` $slots.default? ` | (` __namedParameters ` : \{ ` Component ` : ` VNode ` \< ` RendererNode ` , ` RendererElement ` , \{ ` [key: string] ` : ` any ` ; }\> ; ` route ` : [ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) }) => ` VNode ` \< ` RendererNode ` , ` RendererElement ` , \{ ` [key: string] ` : ` any ` ; }\> [ ] |
146+
131147___
132148
133149### START\_ LOCATION %{#Variables-START_LOCATION}%
194210
195211创建一个 hash 模式的历史。在没有主机的 web 应用 (如 ` file:// ` ) 或无法通过配置服务器来处理任意 URL 的时候非常有用。
196212
213+ #### 参数 %{#Functions-createWebHashHistory-Parameters}%
214+
215+ | 名称 | 类型 | 描述 |
216+ | :------ | :------ | :------ |
217+ | ` base? ` | ` string ` | 可选提供的基础位置。默认为 ` location.pathname + location.search ` 。如果在 ` head ` 中有一个 ` <base> ` 标签,它的值会因此被忽略,** 但注意它会影响所有 history.pushState() 的调用** ,这意味着如果你使用一个 ` <base> ` 标签,它的 ` href ` 值** 必须与这个参数匹配** (忽略 ` # ` 后的任何东西)。 |
218+
219+ #### 返回值 %{#Functions-createWebHashHistory-Returns}%
220+
221+ [ ` RouterHistory ` ] ( interfaces/RouterHistory.md )
222+
197223** 示例**
198224
199225``` js
@@ -210,16 +236,6 @@ createWebHashHistory('/other-folder/') // 给出一个 `https://example.com/othe
210236createWebHashHistory (' /iAmIgnored' ) // 给出一个 `file:///usr/etc/folder/index.html#` 的 URL
211237```
212238
213- #### 参数 %{#Functions-createWebHashHistory-Parameters}%
214-
215- | 名称 | 类型 | 描述 |
216- | :------ | :------ | :------ |
217- | ` base? ` | ` string ` | 可选提供的基础位置。默认为 ` location.pathname + location.search ` 。如果在 ` head ` 中有一个 ` <base> ` 标签,它的值会因此被忽略,** 但注意它会影响所有 history.pushState() 的调用** ,这意味着如果你使用一个 ` <base> ` 标签,它的 ` href ` 值** 必须与这个参数匹配** (忽略 ` # ` 后的任何东西)。 |
218-
219- #### 返回值 %{#Functions-createWebHashHistory-Returns}%
220-
221- [ ` RouterHistory ` ] ( interfaces/RouterHistory.md )
222-
223239___
224240
225241### createWebHistory %{#Functions-createWebHistory}%
246262
247263检查一个对象是否是 [ NavigationFailure] ( interfaces/NavigationFailure.md ) 。
248264
265+ #### 参数 %{#Functions-isNavigationFailure-Parameters}%
266+
267+ | 名称 | 类型 | 描述 |
268+ | :------ | :------ | :------ |
269+ | ` error ` | ` any ` | 可能的 [ NavigationFailure] ( interfaces/NavigationFailure.md ) |
270+ | ` type? ` | ` NAVIGATION_GUARD_REDIRECT ` | 可选的待检查类型 |
271+
272+ #### 返回值 %{#Functions-isNavigationFailure-Returns}%
273+
274+ error is NavigationRedirectError
275+
249276** 示例**
250277
251278``` js
@@ -267,17 +294,6 @@ router.afterEach((to, from, failure) => {
267294})
268295```
269296
270- #### 参数 %{#Functions-isNavigationFailure-Parameters}%
271-
272- | 名称 | 类型 | 描述 |
273- | :------ | :------ | :------ |
274- | ` error ` | ` any ` | 可能的 [ NavigationFailure] ( interfaces/NavigationFailure.md ) |
275- | ` type? ` | ` NAVIGATION_GUARD_REDIRECT ` | 可选的待检查类型 |
276-
277- #### 返回值 %{#Functions-isNavigationFailure-Returns}%
278-
279- error is NavigationRedirectError
280-
281297▸ ** isNavigationFailure** (` error ` , ` type? ` ): error is NavigationFailure
282298
283299#### 参数 %{#Functions-isNavigationFailure-Parameters_1}%
295311
296312### loadRouteLocation %{#Functions-loadRouteLocation}%
297313
298- ▸ ** loadRouteLocation** (` route ` ): ` Promise ` <[ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) \>
314+ ▸ ** loadRouteLocation** (` route ` ): ` Promise ` \ <[ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) \>
299315
300316确保路由被加载,所以它可以作为一个 prop 传递给 ` <RouterView> ` 。
301317
307323
308324#### 返回值 %{#Functions-loadRouteLocation-Returns}%
309325
310- ` Promise ` <[ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) \>
326+ ` Promise ` \ <[ ` RouteLocationNormalizedLoaded ` ] ( interfaces/RouteLocationNormalizedLoaded.md ) \>
311327
312328___
313329
355371
356372| 名称 | 类型 |
357373| :------ | :------ |
358- | ` props ` | ` VueUseOptions ` <` RouterLinkOptions ` \> |
374+ | ` props ` | ` VueUseOptions ` \ <` RouterLinkOptions ` \> |
359375
360376#### 返回值 %{#Functions-useLink-Returns}%
361377
@@ -364,10 +380,10 @@ ___
364380| 名称 | 类型 |
365381| :------ | :------ |
366382| ` href ` | ` ComputedRef<string\> ` |
367- | ` isActive ` | ` ComputedRef ` <` boolean ` \> |
368- | ` isExactActive ` | ` ComputedRef ` <` boolean ` \> |
369- | ` navigate ` | (` e ` : ` MouseEvent ` ) => ` Promise ` <` void ` \| [ ` NavigationFailure ` ] ( interfaces/NavigationFailure.md ) \> |
370- | ` route ` | ` ComputedRef ` <[ ` RouteLocation ` ] ( interfaces/RouteLocation.md ) & { ` href ` : ` string ` }\> |
383+ | ` isActive ` | ` ComputedRef ` \ <` boolean ` \> |
384+ | ` isExactActive ` | ` ComputedRef ` \ <` boolean ` \> |
385+ | ` navigate ` | (` e ` : ` MouseEvent ` ) => ` Promise ` \ <` void ` \| [ ` NavigationFailure ` ] ( interfaces/NavigationFailure.md ) \> |
386+ | ` route ` | ` ComputedRef ` \ <[ ` RouteLocation ` ] ( interfaces/RouteLocation.md ) & { ` href ` : ` string ` }\> |
371387
372388___
373389
0 commit comments