Skip to content
该翻译已同步到了 的版本,其对应的 commit hash 是 d842b6f

API 参考 / RouteLocationNormalized

接口:RouteLocationNormalized

RouteLocation 类似但是其 RouteLocationNormalized.matched 无法包含重定向的记录

继承关系 %{#Hierarchy}%

  • _RouteLocationBase

    RouteLocationNormalized

属性 %{#Properties}%

fullPath %{#Properties-fullPath}%

fullPath: string

包括 searchhash 在内的完整地址。该字符串是经过百分号编码的。

继承自 %{#Properties-fullPath-Inherited-from}%

_RouteLocationBase.fullPath


hash %{#Properties-hash}%

hash: string

当前地址的 hash。如果存在则以 # 开头。

继承自 %{#Properties-hash-Inherited-from}%

_RouteLocationBase.hash


matched %{#Properties-matched}%

matched: RouteRecordNormalized[]

RouteRecordNormalized 数组。


meta %{#Properties-meta}%

meta: RouteMeta

从所有匹配的路由记录中合并的 meta 属性。

继承自 %{#Properties-meta-Inherited-from}%

_RouteLocationBase.meta


name %{#Properties-name}%

name: undefined | null | RouteRecordName

匹配的路由名称。

继承自 %{#Properties-name-Inherited-from}%

_RouteLocationBase.name


params %{#Properties-params}%

params: RouteParams

path 中提取出来并解码后的参数对象。

继承自 %{#Properties-params-Inherited-from}%

_RouteLocationBase.params


path %{#Properties-path}%

path: string

经过百分号编码的 URL 中的 pathname 段。

继承自 %{#Properties-path-Inherited-from}%

_RouteLocationBase.path


query %{#Properties-query}%

query: LocationQuery

代表当前地址的 search 属性的对象

继承自 %{#Properties-query-Inherited-from}%

_RouteLocationBase.query


redirectedFrom %{#Properties-redirectedFrom}%

redirectedFrom: undefined | RouteLocation

包含在重定向到当前地址之前,我们最初想访问的地址。

继承自 %{#Properties-redirectedFrom-Inherited-from}%

_RouteLocationBase.redirectedFrom

Released under the MIT License.