]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs(zh): translate api interfaces (#1821)
authorJinjiang <zhaojinjiang@me.com>
Tue, 16 May 2023 01:46:37 +0000 (11:46 +1000)
committerGitHub <noreply@github.com>
Tue, 16 May 2023 01:46:37 +0000 (09:46 +0800)
* docs(zh): translate api interfaces

* Update Router.md

* Apply suggestions from code review

Co-authored-by: wxsm <wxsms@foxmail.com>
---------

Co-authored-by: wxsm <wxsms@foxmail.com>
20 files changed:
packages/docs/zh/api/enums/NavigationFailureType.md
packages/docs/zh/api/interfaces/HistoryState.md
packages/docs/zh/api/interfaces/NavigationFailure.md
packages/docs/zh/api/interfaces/NavigationGuard.md
packages/docs/zh/api/interfaces/NavigationGuardNext.md
packages/docs/zh/api/interfaces/NavigationGuardWithThis.md
packages/docs/zh/api/interfaces/NavigationHookAfter.md
packages/docs/zh/api/interfaces/RouteLocation.md
packages/docs/zh/api/interfaces/RouteLocationMatched.md
packages/docs/zh/api/interfaces/RouteLocationNormalized.md
packages/docs/zh/api/interfaces/RouteLocationNormalizedLoaded.md
packages/docs/zh/api/interfaces/RouteLocationOptions.md
packages/docs/zh/api/interfaces/RouteMeta.md
packages/docs/zh/api/interfaces/RouteRecordNormalized.md
packages/docs/zh/api/interfaces/Router.md
packages/docs/zh/api/interfaces/RouterHistory.md
packages/docs/zh/api/interfaces/RouterLinkProps.md
packages/docs/zh/api/interfaces/RouterOptions.md
packages/docs/zh/api/interfaces/RouterScrollBehavior.md
packages/docs/zh/api/interfaces/RouterViewProps.md

index 16e66b2012dd90170c21a3ef0e904465058ffc94..0f21352aa3e0ec1c07c835c753db924df65dd62f 100644 (file)
@@ -2,7 +2,7 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationFailureType
+[API 参考](../index.md) / NavigationFailureType
 
 # 枚举:NavigationFailureType %{#enumeration-navigationfailuretype}%
 
index f4becd069bd7ba33ebb2ea2cd3a05d9dcaaa45fc..2e1cc91ed0285f7072768ff1abbc63f933b60b59 100644 (file)
@@ -2,7 +2,7 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / HistoryState
+[API 参考](../index.md) / HistoryState
 
 # 接口:HistoryState %{#interface-historystate}%
 
index d1c5f4c6dc67460e54a63aa9590b6b082b370e99..173bb281b45bab1ac2a827c99dd7a52cc112c0b7 100644 (file)
@@ -2,7 +2,7 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationFailure
+[API 参考](../index.md) / NavigationFailure
 
 # 接口:NavigationFailure %{#interface-navigationfailure}%
 
@@ -68,7 +68,7 @@ ___
 
 • **to**: [`RouteLocationNormalized`](RouteLocationNormalized.md)
 
-Route location we were navigating to
+要导航至的下一个路由位置
 
 ___
 
@@ -76,4 +76,4 @@ ___
 
 • **type**: `NAVIGATION_ABORTED` \| `NAVIGATION_CANCELLED` \| `NAVIGATION_DUPLICATED`
 
-Type of the navigation. One of [NavigationFailureType](../enums/NavigationFailureType.md)
+导航类型。属于 [NavigationFailureType](../enums/NavigationFailureType.md) 的一种。
index 59f65bb1e967fcfaff46b40fe8714231f629631d..10c1d0aef126b4e2ba4549779959b6396fe6e051 100644 (file)
@@ -2,27 +2,26 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationGuard
+[API 参考](../index.md) / NavigationGuard
 
-# Interface: NavigationGuard
+# 接口:NavigationGuard %{#interface-navigationguard}%
 
-## Callable %{#Callable}%
+## 可调用函数 %{#Callable}%
 
 ### NavigationGuard %{#Callable-NavigationGuard}%
 
 ▸ **NavigationGuard**(`to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
 
-Navigation guard. See [Navigation
-Guards](/guide/advanced/navigation-guards.md).
+导航守卫。详情可查阅[导航守卫](/zh/guide/advanced/navigation-guards.md).
 
-#### Parameters %{#Callable-NavigationGuard-Parameters}%
+#### 参数 %{#Callable-NavigationGuard-Parameters}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `to` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `next` | [`NavigationGuardNext`](NavigationGuardNext.md) |
 
-#### Returns %{#Callable-NavigationGuard-Returns}%
+#### 返回值 %{#Callable-NavigationGuard-Returns}%
 
 `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
index 278770b6dad587bede72ead2c4a04d9052abb261..bd7d387bb9e38cb645b3886929dfc3974c9b2608 100644 (file)
@@ -2,17 +2,17 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationGuardNext
+[API 参考](../index.md) / NavigationGuardNext
 
-# Interface: NavigationGuardNext
+# 接口:NavigationGuardNext %{#interface-navigationguardnext}%
 
-## Callable %{#Callable}%
+## 可调用函数 %{#Callable}%
 
 ### NavigationGuardNext %{#Callable-NavigationGuardNext}%
 
 ▸ **NavigationGuardNext**(): `void`
 
-#### Returns %{#Callable-NavigationGuardNext-Returns}%
+#### 返回值 %{#Callable-NavigationGuardNext-Returns}%
 
 `void`
 
@@ -20,13 +20,13 @@ editLink: false
 
 ▸ **NavigationGuardNext**(`error`): `void`
 
-#### Parameters %{#Callable-NavigationGuardNext-Parameters}%
+#### 参数 %{#Callable-NavigationGuardNext-Parameters}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `error` | `Error` |
 
-#### Returns %{#Callable-NavigationGuardNext-Returns_1}%
+#### 返回值 %{#Callable-NavigationGuardNext-Returns_1}%
 
 `void`
 
@@ -34,13 +34,13 @@ editLink: false
 
 ▸ **NavigationGuardNext**(`location`): `void`
 
-#### Parameters %{#Callable-NavigationGuardNext-Parameters_1}%
+#### 参数 %{#Callable-NavigationGuardNext-Parameters_1}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `location` | [`RouteLocationRaw`](../index.md#routelocationraw) |
 
-#### Returns %{#Callable-NavigationGuardNext-Returns_2}%
+#### 返回值 %{#Callable-NavigationGuardNext-Returns_2}%
 
 `void`
 
@@ -48,13 +48,13 @@ editLink: false
 
 ▸ **NavigationGuardNext**(`valid`): `void`
 
-#### Parameters %{#Callable-NavigationGuardNext-Parameters_2}%
+#### 参数 %{#Callable-NavigationGuardNext-Parameters_2}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `valid` | `undefined` \| `boolean` |
 
-#### Returns %{#Callable-NavigationGuardNext-Returns_3}%
+#### 返回值 %{#Callable-NavigationGuardNext-Returns_3}%
 
 `void`
 
@@ -62,12 +62,12 @@ editLink: false
 
 ▸ **NavigationGuardNext**(`cb`): `void`
 
-#### Parameters %{#Callable-NavigationGuardNext-Parameters_3}%
+#### 参数 %{#Callable-NavigationGuardNext-Parameters_3}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `cb` | `NavigationGuardNextCallback` |
 
-#### Returns %{#Callable-NavigationGuardNext-Returns_4}%
+#### 返回值 %{#Callable-NavigationGuardNext-Returns_4}%
 
 `void`
index 2799f4d10483839245b8f8a9d7f89237ebd63e10..dc89efa70ee8e513d14690958c2e7e29f95ecdcc 100644 (file)
@@ -2,34 +2,33 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationGuardWithThis
+[API 参考](../index.md) / NavigationGuardWithThis
 
-# Interface: NavigationGuardWithThis<T\>
+# 接口:NavigationGuardWithThis<T\> %{#interface-navigationguardwiththis-t}%
 
-## Type parameters %{#Type-parameters}%
+## 类型参数 %{#Type-parameters}%
 
 | Name |
 | :------ |
 | `T` |
 
-## Callable %{#Callable}%
+## 可调用函数 %{#Callable}%
 
 ### NavigationGuardWithThis %{#Callable-NavigationGuardWithThis}%
 
 ▸ **NavigationGuardWithThis**(`this`, `to`, `from`, `next`): `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
 
-Navigation guard. See [Navigation
-Guards](/guide/advanced/navigation-guards.md).
+导航守卫。详情可查阅[导航守卫](/zh/guide/advanced/navigation-guards.md).
 
-#### Parameters %{#Callable-NavigationGuardWithThis-Parameters}%
+#### 参数 %{#Callable-NavigationGuardWithThis-Parameters}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `this` | `T` |
 | `to` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `next` | [`NavigationGuardNext`](NavigationGuardNext.md) |
 
-#### Returns %{#Callable-NavigationGuardWithThis-Returns}%
+#### 返回值 %{#Callable-NavigationGuardWithThis-Returns}%
 
 `NavigationGuardReturn` \| `Promise`<`NavigationGuardReturn`\>
index 34fe56b2a873d5878ed8d32df672cdfabf576e99..cbcf3ad72efbae63316714e40b21f8e63b4c8723 100644 (file)
@@ -2,24 +2,24 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / NavigationHookAfter
+[API 参考](../index.md) / NavigationHookAfter
 
-# Interface: NavigationHookAfter
+# 接口:NavigationHookAfter %{#interface-navigationhookafter}%
 
-## Callable %{#Callable}%
+## 可调用函数 %{#Callable}%
 
 ### NavigationHookAfter %{#Callable-NavigationHookAfter}%
 
 ▸ **NavigationHookAfter**(`to`, `from`, `failure?`): `any`
 
-#### Parameters %{#Callable-NavigationHookAfter-Parameters}%
+#### 参数 %{#Callable-NavigationHookAfter-Parameters}%
 
-| Name | Type |
+| 名称 | 类型 |
 | :------ | :------ |
 | `to` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `from` | [`RouteLocationNormalized`](RouteLocationNormalized.md) |
 | `failure?` | `void` \| [`NavigationFailure`](NavigationFailure.md) |
 
-#### Returns %{#Callable-NavigationHookAfter-Returns}%
+#### 返回值 %{#Callable-NavigationHookAfter-Returns}%
 
 `any`
index 9a23955a60eb61fb2900fa5fa501fd7f354bf431..a9db1b0bb4b65e534ad28a000f96e5f6a6dc9df6 100644 (file)
@@ -2,28 +2,27 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteLocation
+[API 参考](../index.md) / RouteLocation
 
-# Interface: RouteLocation
+# 接口:RouteLocation %{#interface-routelocation}%
 
-[RouteLocationRaw](../index.md#routelocationraw) resolved using the matcher
+通过匹配解析出来的 [RouteLocationRaw](../index.md#routelocationraw)
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - `_RouteLocationBase`
 
   ↳ **`RouteLocation`**
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### fullPath %{#Properties-fullPath}%
 
 • **fullPath**: `string`
 
-The whole location including the `search` and `hash`. This string is
-percentage encoded.
+包括 `search` 和 `hash` 在内的完整地址。该字符串是经过百分号编码的。
 
-#### Inherited from %{#Properties-fullPath-Inherited-from}%
+#### 继承自 %{#Properties-fullPath-Inherited-from}%
 
 \_RouteLocationBase.fullPath
 
@@ -33,9 +32,9 @@ ___
 
 • **hash**: `string`
 
-Hash of the current location. If present, starts with a `#`.
+当前地址的 hash。如果存在则以 `#` 开头。
 
-#### Inherited from %{#Properties-hash-Inherited-from}%
+#### 继承自 %{#Properties-hash-Inherited-from}%
 
 \_RouteLocationBase.hash
 
@@ -45,9 +44,7 @@ ___
 
 • **matched**: [`RouteRecordNormalized`](RouteRecordNormalized.md)[]
 
-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
+包含添加记录时被传入的 [RouteRecord](../index.md#routerecord) 的数组。它也可以包含重定向记录。不能直接使用。
 
 ___
 
@@ -55,9 +52,9 @@ ___
 
 • **meta**: [`RouteMeta`](RouteMeta.md)
 
-Merged `meta` properties from all the matched route records.
+从所有匹配的路由记录中合并的 `meta` 属性。
 
-#### Inherited from %{#Properties-meta-Inherited-from}%
+#### 继承自 %{#Properties-meta-Inherited-from}%
 
 \_RouteLocationBase.meta
 
@@ -67,9 +64,9 @@ ___
 
 • **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname)
 
-Name of the matched record
+匹配的路由名称。
 
-#### Inherited from %{#Properties-name-Inherited-from}%
+#### 继承自 %{#Properties-name-Inherited-from}%
 
 \_RouteLocationBase.name
 
@@ -79,9 +76,9 @@ ___
 
 • **params**: [`RouteParams`](../index.md#routeparams)
 
-Object of decoded params extracted from the `path`.
+从 `path` 中提取出来并解码后的参数对象。
 
-#### Inherited from %{#Properties-params-Inherited-from}%
+#### 继承自 %{#Properties-params-Inherited-from}%
 
 \_RouteLocationBase.params
 
@@ -91,9 +88,9 @@ ___
 
 • **path**: `string`
 
-Percentage encoded pathname section of the URL.
+经过百分号编码的 URL 中的 pathname 段。
 
-#### Inherited from %{#Properties-path-Inherited-from}%
+#### 继承自 %{#Properties-path-Inherited-from}%
 
 \_RouteLocationBase.path
 
@@ -103,9 +100,9 @@ ___
 
 • **query**: [`LocationQuery`](../index.md#locationquery)
 
-Object representation of the `search` property of the current location.
+代表当前地址的 `search` 属性的对象
 
-#### Inherited from %{#Properties-query-Inherited-from}%
+#### 继承自 %{#Properties-query-Inherited-from}%
 
 \_RouteLocationBase.query
 
@@ -115,9 +112,8 @@ ___
 
 • **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}%
+#### 继承自 %{#Properties-redirectedFrom-Inherited-from}%
 
 \_RouteLocationBase.redirectedFrom
index 446feb1275ec3256f20f9df3345f1a531a4d5de5..3b8d089845d24b223e1f592dfa05b0bacb45b682 100644 (file)
@@ -2,28 +2,27 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteLocationMatched
+[API 参考](../index.md) / RouteLocationMatched
 
-# Interface: RouteLocationMatched
+# 接口:RouteLocationMatched
 
-Normalized version of a [route record](../index.md#routerecord).
+一条[路由记录](../index.md#routerecord)的规范化版本。
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - [`RouteRecordNormalized`](RouteRecordNormalized.md)
 
   ↳ **`RouteLocationMatched`**
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### aliasOf %{#Properties-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.
+定义了是否这条记录是另一条的别名。如果记录是原始记录,则该属性为 `undefined`。
 
-#### Inherited from %{#Properties-aliasOf-Inherited-from}%
+#### 继承自 %{#Properties-aliasOf-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[aliasOf](RouteRecordNormalized.md#aliasof)
 
@@ -33,9 +32,9 @@ ___
 
 • **beforeEnter**: `undefined` \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[]
 
-Registered beforeEnter guards
+被注册的 beforeEnter 守卫
 
-#### Inherited from %{#Properties-beforeEnter-Inherited-from}%
+#### 继承自 %{#Properties-beforeEnter-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[beforeEnter](RouteRecordNormalized.md#beforeenter)
 
@@ -45,9 +44,9 @@ ___
 
 • **children**: [`RouteRecordRaw`](../index.md#routerecordraw)[]
 
-Nested route records.
+嵌套的路由记录。
 
-#### Inherited from %{#Properties-children-Inherited-from}%
+#### 继承自 %{#Properties-children-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[children](RouteRecordNormalized.md#children)
 
@@ -59,7 +58,7 @@ ___
 
 {@inheritDoc RouteRecordMultipleViews.components}
 
-#### Overrides %{#Properties-components-Overrides}%
+#### Override %{#Properties-components-Overrides}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[components](RouteRecordNormalized.md#components)
 
@@ -69,15 +68,11 @@ ___
 
 • **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`\>, {}\>\>
 
-Mounted route component instances
-Having the instances on the record mean beforeRouteUpdate and
-beforeRouteLeave guards can only be invoked with the latest mounted app
-instance if there are multiple application instances rendering the same
-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.
+<!-- TODO: translation -->
 
-#### Inherited from %{#Properties-instances-Inherited-from}%
+Mounted route component instance。 Having the instances on the record mean beforeRouteUpdate and beforeRouteLeave guards can only be invoked with the latest mounted app instance if there are multiple application instances rendering the same 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.
+
+#### 继承自 %{#Properties-instances-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[instances](RouteRecordNormalized.md#instances)
 
@@ -89,7 +84,7 @@ ___
 
 {@inheritDoc _RouteRecordBase.meta}
 
-#### Inherited from %{#Properties-meta-Inherited-from}%
+#### 继承自 %{#Properties-meta-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[meta](RouteRecordNormalized.md#meta)
 
@@ -101,7 +96,7 @@ ___
 
 {@inheritDoc _RouteRecordBase.name}
 
-#### Inherited from %{#Properties-name-Inherited-from}%
+#### 继承自 %{#Properties-name-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[name](RouteRecordNormalized.md#name)
 
@@ -113,7 +108,7 @@ ___
 
 {@inheritDoc _RouteRecordBase.path}
 
-#### Inherited from %{#Properties-path-Inherited-from}%
+#### 继承自 %{#Properties-path-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[path](RouteRecordNormalized.md#path)
 
@@ -125,7 +120,7 @@ ___
 
 {@inheritDoc RouteRecordMultipleViews.props}
 
-#### Inherited from %{#Properties-props-Inherited-from}%
+#### 继承自 %{#Properties-props-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[props](RouteRecordNormalized.md#props)
 
@@ -137,6 +132,6 @@ ___
 
 {@inheritDoc _RouteRecordBase.redirect}
 
-#### Inherited from %{#Properties-redirect-Inherited-from}%
+#### 继承自 %{#Properties-redirect-Inherited-from}%
 
 [RouteRecordNormalized](RouteRecordNormalized.md).[redirect](RouteRecordNormalized.md#redirect)
index 2e49471da116c480678fb051b1f4aaff9acab19b..820dc7e501909e0a69453b13fbf9910eee94df3c 100644 (file)
@@ -2,29 +2,27 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteLocationNormalized
+[API 参考](../index.md) / RouteLocationNormalized
 
-# Interface: RouteLocationNormalized
+# 接口:RouteLocationNormalized
 
-Similar to [RouteLocation](RouteLocation.md) but its
-[matched](RouteLocationNormalized.md#matched) cannot contain redirect records
+和 [RouteLocation](RouteLocation.md) 类似但是其 [matched](RouteLocationNormalized.md#matched) 无法包含重定向的记录
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - `_RouteLocationBase`
 
   ↳ **`RouteLocationNormalized`**
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### fullPath %{#Properties-fullPath}%
 
 • **fullPath**: `string`
 
-The whole location including the `search` and `hash`. This string is
-percentage encoded.
+包括 `search` 和 `hash` 在内的完整地址。该字符串是经过百分号编码的。
 
-#### Inherited from %{#Properties-fullPath-Inherited-from}%
+#### 继承自 %{#Properties-fullPath-Inherited-from}%
 
 \_RouteLocationBase.fullPath
 
@@ -34,9 +32,9 @@ ___
 
 • **hash**: `string`
 
-Hash of the current location. If present, starts with a `#`.
+当前地址的 hash。如果存在则以 `#` 开头。
 
-#### Inherited from %{#Properties-hash-Inherited-from}%
+#### 继承自 %{#Properties-hash-Inherited-from}%
 
 \_RouteLocationBase.hash
 
@@ -46,7 +44,7 @@ ___
 
 • **matched**: [`RouteRecordNormalized`](RouteRecordNormalized.md)[]
 
-Array of [RouteRecordNormalized](RouteRecordNormalized.md)
+[RouteRecordNormalized](RouteRecordNormalized.md) 数组。
 
 ___
 
@@ -54,9 +52,9 @@ ___
 
 • **meta**: [`RouteMeta`](RouteMeta.md)
 
-Merged `meta` properties from all the matched route records.
+从所有匹配的路由记录中合并的 `meta` 属性。
 
-#### Inherited from %{#Properties-meta-Inherited-from}%
+#### 继承自 %{#Properties-meta-Inherited-from}%
 
 \_RouteLocationBase.meta
 
@@ -66,9 +64,9 @@ ___
 
 • **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname)
 
-Name of the matched record
+匹配的路由名称。
 
-#### Inherited from %{#Properties-name-Inherited-from}%
+#### 继承自 %{#Properties-name-Inherited-from}%
 
 \_RouteLocationBase.name
 
@@ -78,9 +76,9 @@ ___
 
 • **params**: [`RouteParams`](../index.md#routeparams)
 
-Object of decoded params extracted from the `path`.
+从 `path` 中提取出来并解码后的参数对象。
 
-#### Inherited from %{#Properties-params-Inherited-from}%
+#### 继承自 %{#Properties-params-Inherited-from}%
 
 \_RouteLocationBase.params
 
@@ -90,9 +88,9 @@ ___
 
 • **path**: `string`
 
-Percentage encoded pathname section of the URL.
+经过百分号编码的 URL 中的 pathname 段。
 
-#### Inherited from %{#Properties-path-Inherited-from}%
+#### 继承自 %{#Properties-path-Inherited-from}%
 
 \_RouteLocationBase.path
 
@@ -102,9 +100,9 @@ ___
 
 • **query**: [`LocationQuery`](../index.md#locationquery)
 
-Object representation of the `search` property of the current location.
+代表当前地址的 `search` 属性的对象
 
-#### Inherited from %{#Properties-query-Inherited-from}%
+#### 继承自 %{#Properties-query-Inherited-from}%
 
 \_RouteLocationBase.query
 
@@ -114,9 +112,8 @@ ___
 
 • **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}%
+#### 继承自 %{#Properties-redirectedFrom-Inherited-from}%
 
 \_RouteLocationBase.redirectedFrom
index 0f3b828afc64564d109a28c4555bed610c6382ca..07314567aa13cc082419e3dbc5e7be29fb3de26d 100644 (file)
@@ -2,28 +2,29 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteLocationNormalizedLoaded
+[API 参考](../index.md) / RouteLocationNormalizedLoaded
 
-# Interface: RouteLocationNormalizedLoaded
+# 接口:RouteLocationNormalizedLoaded
+
+<!-- TODO: translation -->
 
 [RouteLocationRaw](../index.md#routelocationraw) with
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - `_RouteLocationBase`
 
   ↳ **`RouteLocationNormalizedLoaded`**
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### fullPath %{#Properties-fullPath}%
 
 • **fullPath**: `string`
 
-The whole location including the `search` and `hash`. This string is
-percentage encoded.
+包括 `search` 和 `hash` 在内的完整地址。该字符串是经过百分号编码的。
 
-#### Inherited from %{#Properties-fullPath-Inherited-from}%
+#### 继承自 %{#Properties-fullPath-Inherited-from}%
 
 \_RouteLocationBase.fullPath
 
@@ -33,9 +34,9 @@ ___
 
 • **hash**: `string`
 
-Hash of the current location. If present, starts with a `#`.
+当前地址的 hash。如果存在则以 `#` 开头。
 
-#### Inherited from %{#Properties-hash-Inherited-from}%
+#### 继承自 %{#Properties-hash-Inherited-from}%
 
 \_RouteLocationBase.hash
 
@@ -45,10 +46,7 @@ ___
 
 • **matched**: [`RouteLocationMatched`](RouteLocationMatched.md)[]
 
-Array of [RouteLocationMatched](RouteLocationMatched.md) containing only plain components (any
-lazy-loaded components have been loaded and were replaced inside the
-`components` object) so it can be directly used to display routes. It
-cannot contain redirect records either
+[RouteLocationMatched](RouteLocationMatched.md) 数组,只包含直接的组件 (任何已被加载并在 `components` 对象内被替换掉的懒加载组件)。所以它可以被直接用于展示路由。同样它不包含重定向的记录。
 
 ___
 
@@ -56,9 +54,9 @@ ___
 
 • **meta**: [`RouteMeta`](RouteMeta.md)
 
-Merged `meta` properties from all the matched route records.
+从所有匹配的路由记录中合并的 `meta` 属性。
 
-#### Inherited from %{#Properties-meta-Inherited-from}%
+#### 继承自 %{#Properties-meta-Inherited-from}%
 
 \_RouteLocationBase.meta
 
@@ -68,9 +66,9 @@ ___
 
 • **name**: `undefined` \| ``null`` \| [`RouteRecordName`](../index.md#routerecordname)
 
-Name of the matched record
+匹配的路由名称。
 
-#### Inherited from %{#Properties-name-Inherited-from}%
+#### 继承自 %{#Properties-name-Inherited-from}%
 
 \_RouteLocationBase.name
 
@@ -80,9 +78,9 @@ ___
 
 • **params**: [`RouteParams`](../index.md#routeparams)
 
-Object of decoded params extracted from the `path`.
+从 `path` 中提取出来并解码后的参数对象。
 
-#### Inherited from %{#Properties-params-Inherited-from}%
+#### 继承自 %{#Properties-params-Inherited-from}%
 
 \_RouteLocationBase.params
 
@@ -92,9 +90,9 @@ ___
 
 • **path**: `string`
 
-Percentage encoded pathname section of the URL.
+经过百分号编码的 URL 中的 pathname 段。
 
-#### Inherited from %{#Properties-path-Inherited-from}%
+#### 继承自 %{#Properties-path-Inherited-from}%
 
 \_RouteLocationBase.path
 
@@ -104,9 +102,9 @@ ___
 
 • **query**: [`LocationQuery`](../index.md#locationquery)
 
-Object representation of the `search` property of the current location.
+代表当前地址的 `search` 属性的对象
 
-#### Inherited from %{#Properties-query-Inherited-from}%
+#### 继承自 %{#Properties-query-Inherited-from}%
 
 \_RouteLocationBase.query
 
@@ -116,9 +114,8 @@ ___
 
 • **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}%
+#### 继承自 %{#Properties-redirectedFrom-Inherited-from}%
 
 \_RouteLocationBase.redirectedFrom
index 488dc5768937c6269a767ccb44a5f617191cdbf1..c12a05b77db120f8f8cabedfb11686e29d19900c 100644 (file)
@@ -2,36 +2,32 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteLocationOptions
+[API 参考](../index.md) / RouteLocationOptions
 
-# Interface: RouteLocationOptions
+# 接口:RouteLocationOptions
 
-Common options for all navigation methods.
+对所有导航方法通用的选项。
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### force %{#Properties-force}%
 
-• `Optional` **force**: `boolean`
+• `可选` **force**: `boolean`
 
-Triggers the navigation even if the location is the same as the current one.
-Note this will also add a new entry to the history unless `replace: true`
-is passed.
+触发导航,即使该地址与当前地址相同。请注意,这也会新添加一条历史记录,除非传入 `replace: true`。
 
 ___
 
 ### replace %{#Properties-replace}%
 
-• `Optional` **replace**: `boolean`
+• `可选` **replace**: `boolean`
 
-Replace the entry in the history instead of pushing a new entry
+替换而不是加入一个新的历史记录。
 
 ___
 
 ### state %{#Properties-state}%
 
-• `Optional` **state**: [`HistoryState`](HistoryState.md)
+• `可选` **state**: [`HistoryState`](HistoryState.md)
 
-State to save using the History API. This cannot contain any reactive
-values and some primitives like Symbols are forbidden. More info at
-https://developer.mozilla.org/en-US/docs/Web/API/History/state
+使用 History API 保存的状态。它不能包含任何响应性的值,同时一些诸如 Symbol 的基础类型是被禁用的。更多信息见 https://developer.mozilla.org/en-US/docs/Web/API/History/state
index 344ab4abc6ea80b9c2e14e60f7556eaa8801df65..d7fdb4c096d6bfc9511111629d3a3bf139ef5c51 100644 (file)
@@ -2,16 +2,16 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteMeta
+[API 参考](../index.md) / RouteMeta
 
-# Interface: RouteMeta
+# 接口:RouteMeta
 
-Interface to type `meta` fields in route records.
+路由记录中的 `meta` 字段的类型接口。
 
 **`Example`**
 
 ```ts
-// typings.d.ts or router.ts
+// typings.d.ts  router.ts
 import 'vue-router';
 
 declare module 'vue-router' {
@@ -21,7 +21,7 @@ declare module 'vue-router' {
  }
 ```
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - `Record`<`string` \| `number` \| `symbol`, `unknown`\>
 
index a2a800b97a692a5519796e59d931103466ef977a..4ac724ed3c32edce48f3133d7dab7a6b67cd54ec 100644 (file)
@@ -2,26 +2,25 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouteRecordNormalized
+[API 参考](../index.md) / RouteRecordNormalized
 
-# Interface: RouteRecordNormalized
+# 接口:RouteRecordNormalized
 
-Normalized version of a [route record](../index.md#routerecord).
+一条[路由记录](../index.md#routerecord)的规范化版本。
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - **`RouteRecordNormalized`**
 
   ↳ [`RouteLocationMatched`](RouteLocationMatched.md)
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### aliasOf %{#Properties-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.
+定义了是否这条记录是另一条的别名。如果记录是原始记录,则该属性为 `undefined`。
 
 ___
 
@@ -29,7 +28,7 @@ ___
 
 • **beforeEnter**: `undefined` \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> \| [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\>[]
 
-Registered beforeEnter guards
+被注册的 beforeEnter 守卫
 
 ___
 
@@ -37,7 +36,7 @@ ___
 
 • **children**: [`RouteRecordRaw`](../index.md#routerecordraw)[]
 
-Nested route records.
+嵌套的路由记录。
 
 ___
 
@@ -53,6 +52,8 @@ ___
 
 • **instances**: `Record`<`string`, `undefined` \| ``null`` \| `ComponentPublicInstance`<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`\>, {}\>\>
 
+<!-- TODO: translation -->
+
 Mounted route component instances
 Having the instances on the record mean beforeRouteUpdate and
 beforeRouteLeave guards can only be invoked with the latest mounted app
index 001f95c42689915f8d21e61bc214572f4d6a3fc1..ae8f773bd49a08cc87d80b5786b433e646f94458 100644 (file)
@@ -2,17 +2,19 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / Router
+<!-- TODO: translation -->
 
-# Interface: Router
+[API 参考](../index.md) / Router
+
+# 接口:Router
 
 路由器实例。
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### currentRoute %{#Properties-currentRoute}%
 
-• `Readonly` **currentRoute**: `Ref`<[`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md)\>
+• `只读` **currentRoute**: `Ref`<[`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md)\>
 
 当前的 [RouteLocationNormalized](RouteLocationNormalized.md)。
 
@@ -28,7 +30,7 @@ ___
 
 ### options %{#Properties-options}%
 
-• `Readonly` **options**: [`RouterOptions`](RouterOptions.md)
+• `只读` **options**: [`RouterOptions`](RouterOptions.md)
 
 创建路由器时的原始选项对象。
 
@@ -40,14 +42,14 @@ ___
 
 添加一个新的[路由记录](../index.md#routerecordraw),将其作为一个已有路由的子路由。
 
-#### Parameters %{#Methods-addRoute-Parameters}%
+#### 参数 %{#Methods-addRoute-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `parentName` | [`RouteRecordName`](../index.md#routerecordname) | `route` 应该被加入到的父级路由记录 |
 | `route` | [`RouteRecordRaw`](../index.md#routerecordraw) | 要加入的路由记录 |
 
-#### Returns %{#Methods-addRoute-Returns}%
+#### 返回值 %{#Methods-addRoute-Returns}%
 
 `fn`
 
@@ -55,7 +57,7 @@ ___
 
 添加一个新的[路由记录](../index.md#routerecordraw),将其作为一个已有路由的子路由。
 
-##### Returns %{#Methods-addRoute-Returns-Returns}%
+##### 返回值 %{#Methods-addRoute-Returns-Returns}%
 
 `void`
 
@@ -63,13 +65,13 @@ ___
 
 添加一个新的[路由记录](../index.md#routerecordraw)到该路由器中。
 
-#### Parameters %{#Methods-addRoute-Parameters_1}%
+#### 参数 %{#Methods-addRoute-Parameters_1}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `route` | [`RouteRecordRaw`](../index.md#routerecordraw) | 要加入的路由记录 |
 
-#### Returns %{#Methods-addRoute-Returns_1}%
+#### 返回值 %{#Methods-addRoute-Returns_1}%
 
 `fn`
 
@@ -77,7 +79,7 @@ ___
 
 添加一个新的[路由记录](../index.md#routerecordraw)到该路由器中。
 
-##### Returns %{#Methods-addRoute-Returns-Returns_1}%
+##### 返回值 %{#Methods-addRoute-Returns-Returns_1}%
 
 `void`
 
@@ -99,13 +101,13 @@ router.afterEach((to, from, failure) => {
 })
 ```
 
-#### Parameters %{#Methods-afterEach-Parameters}%
+#### 参数 %{#Methods-afterEach-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `guard` | [`NavigationHookAfter`](NavigationHookAfter.md) | 要加入的导航钩子 |
 
-#### Returns %{#Methods-afterEach-Returns}%
+#### 返回值 %{#Methods-afterEach-Returns}%
 
 `fn`
 
@@ -123,7 +125,7 @@ router.afterEach((to, from, failure) => {
 })
 ```
 
-##### Returns %{#Methods-afterEach-Returns-Returns}%
+##### 返回值 %{#Methods-afterEach-Returns-Returns}%
 
 `void`
 
@@ -135,7 +137,7 @@ ___
 
 通过调用 `history.back()` 在可能的情况下在历史中后退。相当于 `router.go(-1)`。
 
-#### Returns %{#Methods-back-Returns}%
+#### 返回值 %{#Methods-back-Returns}%
 
 `void`
 
@@ -147,13 +149,13 @@ ___
 
 添加一个导航钩子,它会在每次导航之前被执行。返回一个用来移除该钩子的函数。
 
-#### Parameters %{#Methods-beforeEach-Parameters}%
+#### 参数 %{#Methods-beforeEach-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `guard` | [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> | 要加入的导航钩子 |
 
-#### Returns %{#Methods-beforeEach-Returns}%
+#### 返回值 %{#Methods-beforeEach-Returns}%
 
 `fn`
 
@@ -161,7 +163,7 @@ ___
 
 添加一个导航钩子,它会在每次导航之前被执行。返回一个用来移除该钩子的函数。
 
-##### Returns %{#Methods-beforeEach-Returns-Returns}%
+##### 返回值 %{#Methods-beforeEach-Returns-Returns}%
 
 `void`
 
@@ -181,13 +183,13 @@ router.beforeResolve(to => {
 })
 ```
 
-#### Parameters %{#Methods-beforeResolve-Parameters}%
+#### 参数 %{#Methods-beforeResolve-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `guard` | [`NavigationGuardWithThis`](NavigationGuardWithThis.md)<`undefined`\> | navigation guard to add |
 
-#### Returns %{#Methods-beforeResolve-Returns}%
+#### 返回值 %{#Methods-beforeResolve-Returns}%
 
 `fn`
 
@@ -203,7 +205,7 @@ router.beforeResolve(to => {
 })
 ```
 
-##### Returns %{#Methods-beforeResolve-Returns-Returns}%
+##### 返回值 %{#Methods-beforeResolve-Returns-Returns}%
 
 `void`
 
@@ -215,7 +217,7 @@ ___
 
 通过调用 `history.forward()` 在可能的情况下在历史中前进。相当于 `router.go(1)`。
 
-#### Returns %{#Methods-forward-Returns}%
+#### 返回值 %{#Methods-forward-Returns}%
 
 `void`
 
@@ -227,7 +229,7 @@ ___
 
 获得所有[路由记录](../index.md#routerecord)的完整列表。
 
-#### Returns %{#Methods-getRoutes-Returns}%
+#### 返回值 %{#Methods-getRoutes-Returns}%
 
 [`RouteRecordNormalized`](RouteRecordNormalized.md)[]
 
@@ -239,13 +241,13 @@ ___
 
 允许你在历史中前进或后退。相当于 `router.go()`。
 
-#### Parameters %{#Methods-go-Parameters}%
+#### 参数 %{#Methods-go-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `delta` | `number` | 相对于当前页面你想要移动到的历史中的位置 |
 
-#### Returns %{#Methods-go-Returns}%
+#### 返回值 %{#Methods-go-Returns}%
 
 `void`
 
@@ -257,13 +259,13 @@ ___
 
 检查一个给定名称的路由是否存在。
 
-#### Parameters %{#Methods-hasRoute-Parameters}%
+#### 参数 %{#Methods-hasRoute-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `name` | [`RouteRecordName`](../index.md#routerecordname) | 要检查的路由名称 |
 
-#### Returns %{#Methods-hasRoute-Returns}%
+#### 返回值 %{#Methods-hasRoute-Returns}%
 
 `boolean`
 
@@ -277,7 +279,7 @@ ___
 
 这在服务端渲染中确认服务端和客户端输出一致的时候非常有用。注意在服务端你需要手动加入初始地址,而在客户端,路由器会从 URL 中自动获取。
 
-#### Returns %{#Methods-isReady-Returns}%
+#### 返回值 %{#Methods-isReady-Returns}%
 
 `Promise`<`void`\>
 
@@ -289,13 +291,13 @@ ___
 
 添加一个错误处理器,它会在每次导航遇到未被捕获的错误出现时被调用。其中包括同步和异步被抛出的错误、在任何导航守卫中返回或传入 `next` 的错误、尝试解析一个需要渲染路由的异步组件时发生的错误。
 
-#### Parameters %{#Methods-onError-Parameters}%
+#### 参数 %{#Methods-onError-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `handler` | `_ErrorHandler` | 要注册的错误处理器 |
 
-#### Returns %{#Methods-onError-Returns}%
+#### 返回值 %{#Methods-onError-Returns}%
 
 `fn`
 
@@ -303,7 +305,7 @@ ___
 
 添加一个错误处理器,它会在每次导航遇到未被捕获的错误出现时被调用。其中包括同步和异步被抛出的错误、在任何导航守卫中返回或传入 `next` 的错误、尝试解析一个需要渲染路由的异步组件时发生的错误。
 
-##### Returns %{#Methods-onError-Returns-Returns}%
+##### 返回值 %{#Methods-onError-Returns-Returns}%
 
 `void`
 
@@ -315,13 +317,13 @@ ___
 
 程序式地通过将一条记录加入到历史栈中来导航到一个新的 URL。
 
-#### Parameters %{#Methods-push-Parameters}%
+#### 参数 %{#Methods-push-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | 要导航到的路由 |
 
-#### Returns %{#Methods-push-Returns}%
+#### 返回值 %{#Methods-push-Returns}%
 
 `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\>
 
@@ -333,13 +335,13 @@ ___
 
 根据其名称移除一个现有的路由。
 
-#### Parameters %{#Methods-removeRoute-Parameters}%
+#### 参数 %{#Methods-removeRoute-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `name` | [`RouteRecordName`](../index.md#routerecordname) | 要移除的路由名称 |
 
-#### Returns %{#Methods-removeRoute-Returns}%
+#### 返回值 %{#Methods-removeRoute-Returns}%
 
 `void`
 
@@ -351,13 +353,13 @@ ___
 
 程序式地通过替换历史栈中的当前记录来导航到一个新的 URL。
 
-#### Parameters %{#Methods-replace-Parameters}%
+#### 参数 %{#Methods-replace-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | 要导航到的路由 |
 
-#### Returns %{#Methods-replace-Returns}%
+#### 返回值 %{#Methods-replace-Returns}%
 
 `Promise`<`undefined` \| `void` \| [`NavigationFailure`](NavigationFailure.md)\>
 
@@ -369,13 +371,13 @@ ___
 
 返回一个[路由地址](../index.md#routelocationraw)的[规范化版本](RouteLocation.md)。同时包含一个包含任何现有 `base` 的 `href` 属性。默认情况下,用于 `router.currentRoute` 的 `currentLocation` 应该在特别高阶的用例下才会被覆写。
 
-#### Parameters %{#Methods-resolve-Parameters}%
+#### 参数 %{#Methods-resolve-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `to` | [`RouteLocationRaw`](../index.md#routelocationraw) | 要解析的原始路由地址 |
 | `currentLocation?` | [`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md) | 可选的被解析的当前地址 |
 
-#### Returns %{#Methods-resolve-Returns}%
+#### 返回值 %{#Methods-resolve-Returns}%
 
 [`RouteLocation`](RouteLocation.md) & { `href`: `string`  }
index 7349c181c761f9dda942cb514b7f53f735b23de4..8f94710d8fcb4aa7e05f55b4fcdc65930fdff1bf 100644 (file)
@@ -2,38 +2,35 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouterHistory
+[API 参考](../index.md) / RouterHistory
 
-# Interface: RouterHistory
+# 接口:RouterHistory
 
-Interface implemented by History implementations that can be passed to the
-router as Router.history
+由 History 实现的接口,可以作为 Router.history 传递给路由器。
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### base %{#Properties-base}%
 
-• `Readonly` **base**: `string`
+• `只读` **base**: `string`
 
-Base path that is prepended to every url. This allows hosting an SPA at a
-sub-folder of a domain like `example.com/sub-folder` by having a `base` of
-`/sub-folder`
+基准路径,它被预置到每个 URL 上。这允许在一个域名子文件夹中托管 SPA,例如将 `base` 设置为 `/sub-folder` 使得其托管在 `example.com/sub-folder`。
 
 ___
 
 ### location %{#Properties-location}%
 
-• `Readonly` **location**: `string`
+• `只读` **location**: `string`
 
-Current History location
+当前历史的地址
 
 ___
 
 ### state %{#Properties-state}%
 
-• `Readonly` **state**: [`HistoryState`](HistoryState.md)
+• `只读` **state**: [`HistoryState`](HistoryState.md)
 
-Current History state
+当前历史的状态
 
 ## Methods %{#Methods}%
 
@@ -41,15 +38,15 @@ Current History state
 
 ▸ **createHref**(`location`): `string`
 
-Generates the corresponding href to be used in an anchor tag.
+生成用于链接标签的相应的 href。
 
-#### Parameters %{#Methods-createHref-Parameters}%
+#### 参数 %{#Methods-createHref-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
-| `location` | `string` | history location that should create an href |
+| `location` | `string` | 应该创建一个 href 的历史的地址 |
 
-#### Returns %{#Methods-createHref-Returns}%
+#### 返回值 %{#Methods-createHref-Returns}%
 
 `string`
 
@@ -59,9 +56,9 @@ ___
 
 ▸ **destroy**(): `void`
 
-Clears any event listener attached by the history implementation.
+清除任何通过该历史实现附加的事件监听器。
 
-#### Returns %{#Methods-destroy-Returns}%
+#### 返回值 %{#Methods-destroy-Returns}%
 
 `void`
 
@@ -71,7 +68,7 @@ ___
 
 ▸ **go**(`delta`, `triggerListeners?`): `void`
 
-Traverses history in a given direction.
+按指定方向访问历史。
 
 **`Example`**
 
@@ -80,14 +77,14 @@ myHistory.go(-1) // equivalent to window.history.back()
 myHistory.go(1) // equivalent to window.history.forward()
 ```
 
-#### Parameters %{#Methods-go-Parameters}%
+#### 参数 %{#Methods-go-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 |
+| `delta` | `number` | 访问的距离。如果 delta \< 0 则后退相应数量的记录,如果 \> 0 则前进。 |
+| `triggerListeners?` | `boolean` | 是否应该触发连接到该历史的监听器 |
 
-#### Returns %{#Methods-go-Returns}%
+#### 返回值 %{#Methods-go-Returns}%
 
 `void`
 
@@ -97,35 +94,29 @@ ___
 
 ▸ **listen**(`callback`): () => `void`
 
-Attach a listener to the History implementation that is triggered when the
-navigation is triggered from outside (like the Browser back and forward
-buttons) or when passing `true` to RouterHistory.back and
-RouterHistory.forward
+给历史实现附加一个监听器,当导航从外部被触发时 (像浏览器的前进后退按钮) 或者向 RouterHistory.back 和 RouterHistory.forward 传递 `true` 时,监听器就会被触发。
 
-#### Parameters %{#Methods-listen-Parameters}%
+#### 参数 %{#Methods-listen-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
-| `callback` | `NavigationCallback` | listener to attach |
+| `callback` | `NavigationCallback` | 附加的监听器 |
 
-#### Returns %{#Methods-listen-Returns}%
+#### 返回值 %{#Methods-listen-Returns}%
 
 `fn`
 
-a callback to remove the listener
+用来移除该监听器的回调函数。
 
 ▸ (): `void`
 
-Attach a listener to the History implementation that is triggered when the
-navigation is triggered from outside (like the Browser back and forward
-buttons) or when passing `true` to RouterHistory.back and
-RouterHistory.forward
+给历史实现附加一个监听器,当导航从外部被触发时 (像浏览器的前进后退按钮) 或者向 RouterHistory.back 和 RouterHistory.forward 传递 `true` 时,监听器就会被触发。
 
-##### Returns %{#Methods-listen-Returns-Returns}%
+##### 返回值 %{#Methods-listen-Returns-Returns}%
 
 `void`
 
-a callback to remove the listener
+用来移除该监听器的回调函数。
 
 ___
 
@@ -133,17 +124,16 @@ ___
 
 ▸ **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.
+导航到一个地址。在 HTML5 历史实现下,这将调用 `history.pushState` 来有效改变 URL。
 
-#### Parameters %{#Methods-push-Parameters}%
+#### 参数 %{#Methods-push-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
 | `to` | `string` | location to push |
-| `data?` | [`HistoryState`](HistoryState.md) | optional [HistoryState](HistoryState.md) to be associated with the navigation entry |
+| `data?` | [`HistoryState`](HistoryState.md) | 可选的 [HistoryState](HistoryState.md) 以关联该导航记录 |
 
-#### Returns %{#Methods-push-Returns}%
+#### 返回值 %{#Methods-push-Returns}%
 
 `void`
 
@@ -153,16 +143,16 @@ ___
 
 ▸ **replace**(`to`, `data?`): `void`
 
-Same as [push](RouterHistory.md#push) but performs a `history.replaceState`
-instead of `history.pushState`
+和 [push](RouterHistory.md#push) 相同,只是执行了 `history.replaceState`
+以换掉 `history.pushState`。
 
-#### Parameters %{#Methods-replace-Parameters}%
+#### 参数 %{#Methods-replace-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
-| `to` | `string` | location to set |
-| `data?` | [`HistoryState`](HistoryState.md) | optional [HistoryState](HistoryState.md) to be associated with the navigation entry |
+| `to` | `string` | 要设置的地址 |
+| `data?` | [`HistoryState`](HistoryState.md) | 可选的 [HistoryState](HistoryState.md) 以关联该导航记录 |
 
-#### Returns %{#Methods-replace-Returns}%
+#### 返回值 %{#Methods-replace-Returns}%
 
 `void`
index af43373d61a9526ba4d46abdefb8c919ca54a674..ce13b36742dcbd55b7095a4a790033b64931420c 100644 (file)
@@ -2,31 +2,31 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouterLinkProps
+[API 参考](../index.md) / RouterLinkProps
 
-# Interface: RouterLinkProps
+# 接口:RouterLinkProps
 
-## Hierarchy %{#Hierarchy}%
+## 继承关系 %{#Hierarchy}%
 
 - `RouterLinkOptions`
 
   ↳ **`RouterLinkProps`**
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### activeClass %{#Properties-activeClass}%
 
-• `Optional` **activeClass**: `string`
+• `可选` **activeClass**: `string`
 
-Class to apply when the link is active
+链接在匹配当前路由时被应用到 class。
 
 ___
 
 ### ariaCurrentValue %{#Properties-ariaCurrentValue}%
 
-• `Optional` **ariaCurrentValue**: ``"location"`` \| ``"time"`` \| ``"page"`` \| ``"step"`` \| ``"date"`` \| ``"true"`` \| ``"false"``
+• `可选` **ariaCurrentValue**: ``"location"`` \| ``"time"`` \| ``"page"`` \| ``"step"`` \| ``"date"`` \| ``"true"`` \| ``"false"``
 
-Value passed to the attribute `aria-current` when the link is exact active.
+链接在匹配当前路由时传入 `aria-current` attribute 的值。
 
 **`Default Value`**
 
@@ -36,28 +36,27 @@ ___
 
 ### custom %{#Properties-custom}%
 
-• `Optional` **custom**: `boolean`
+• `可选` **custom**: `boolean`
 
-Whether RouterLink should not wrap its content in an `a` tag. Useful when
-using `v-slot` to create a custom RouterLink
+RouterLink 是否应该将其内容包裹在一个 `a` 标签里。用于通过 `v-slot` 创建自定义 RouterLink。
 
 ___
 
 ### exactActiveClass %{#Properties-exactActiveClass}%
 
-• `Optional` **exactActiveClass**: `string`
+• `可选` **exactActiveClass**: `string`
 
-Class to apply when the link is exact active
+链接在严格匹配当前路由时被应用到 class。
 
 ___
 
 ### replace %{#Properties-replace}%
 
-• `Optional` **replace**: `boolean`
+• `可选` **replace**: `boolean`
 
-Calls `router.replace` instead of `router.push`.
+调用 `router.replace` 以替换 `router.push`。
 
-#### Inherited from %{#Properties-replace-Inherited-from}%
+#### 继承自 %{#Properties-replace-Inherited-from}%
 
 RouterLinkOptions.replace
 
@@ -67,8 +66,8 @@ ___
 
 • **to**: [`RouteLocationRaw`](../index.md#routelocationraw)
 
-Route Location the link should navigate to when clicked on.
+当点击该链接时应该进入的路由地址。
 
-#### Inherited from %{#Properties-to-Inherited-from}%
+#### 继承自 %{#Properties-to-Inherited-from}%
 
 RouterLinkOptions.to
index 3a5b63b8086dcbbd5bf68237bcc6167862ba4fa5..a713881aaa2ddf3ac3c4f0873c1a31f681da9e1c 100644 (file)
@@ -2,7 +2,7 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouterOptions
+[API 参考](../index.md) / RouterOptions
 
 # 接口:RouterOptions %{#interface-routeroptions}%
 
index ee3c2affe347fd4a1a41906d8f31b4f514cc1119..c0eb1742b709f5c68730fa15d9042d76f95afb83 100644 (file)
@@ -2,24 +2,24 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouterScrollBehavior
+[API 参考](../index.md) / RouterScrollBehavior
 
-# Interface: RouterScrollBehavior
+# 接口:RouterScrollBehavior
 
-## Callable %{#Callable}%
+## 可调用函数 %{#Callable}%
 
 ### RouterScrollBehavior %{#Callable-RouterScrollBehavior}%
 
 ▸ **RouterScrollBehavior**(`to`, `from`, `savedPosition`): `Awaitable`<``false`` \| `void` \| `ScrollPosition`\>
 
-#### Parameters %{#Callable-RouterScrollBehavior-Parameters}%
+#### 参数 %{#Callable-RouterScrollBehavior-Parameters}%
 
-| Name | Type | Description |
+| 名称 | 类型 | 描述 |
 | :------ | :------ | :------ |
-| `to` | [`RouteLocationNormalized`](RouteLocationNormalized.md) | Route location where we are navigating to |
-| `from` | [`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md) | Route location where we are navigating from |
-| `savedPosition` | ``null`` \| `_ScrollPositionNormalized` | saved position if it exists, `null` otherwise |
+| `to` | [`RouteLocationNormalized`](RouteLocationNormalized.md) | 我们要导航到的路由地址 |
+| `from` | [`RouteLocationNormalizedLoaded`](RouteLocationNormalizedLoaded.md) | 我们要离开的路由地址 |
+| `savedPosition` | ``null`` \| `_ScrollPositionNormalized` | 要保存的页面位置,如果不存在则是 `null` |
 
-#### Returns %{#Callable-RouterScrollBehavior-Returns}%
+#### 返回值 %{#Callable-RouterScrollBehavior-Returns}%
 
 `Awaitable`<``false`` \| `void` \| `ScrollPosition`\>
index e5c8034a005e7bd82f20e4ca9ac4155bc53d11c0..aaeac2a4988678a2eb7577740bf76b15f199e499 100644 (file)
@@ -2,18 +2,18 @@
 editLink: false
 ---
 
-[API Documentation](../index.md) / RouterViewProps
+[API 参考](../index.md) / RouterViewProps
 
-# Interface: RouterViewProps
+# 接口:RouterViewProps
 
-## Properties %{#Properties}%
+## 属性 %{#Properties}%
 
 ### name %{#Properties-name}%
 
-• `Optional` **name**: `string`
+• `可选` **name**: `string`
 
 ___
 
 ### route %{#Properties-route}%
 
-• `Optional` **route**: [`RouteLocationNormalized`](RouteLocationNormalized.md)
+• `可选` **route**: [`RouteLocationNormalized`](RouteLocationNormalized.md)