]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs(zh): remove excess word (#2081)
authorhojas <cyxhuan9@163.com>
Sat, 16 Dec 2023 03:35:10 +0000 (11:35 +0800)
committerGitHub <noreply@github.com>
Sat, 16 Dec 2023 03:35:10 +0000 (11:35 +0800)
packages/docs/zh/guide/advanced/meta.md

index 4e1ed64aae434a315833244f23d63a4613bf35bc..a2a53094b9715c45b84b805e11bc85e622ce6c7d 100644 (file)
@@ -38,7 +38,7 @@ const routes = [
 
 例如,根据上面的路由配置,`/posts/new` 这个 URL 将会匹配父路由记录 (`path: '/posts'`) 以及子路由记录 (`path: 'new'`)。
 
-一个路由匹配到的所有路由记录会暴露为 `$route` 对象(还有在导航守卫中的路由对象)的`$route.matched` 数组。我们需要遍历这个数组来检查路由记录中的 `meta` 字段,但是 Vue Router 还为你提供了一个 `$route.meta` 方法,它是一个非递归合并**所有 `meta`** 字段(从父字段到子字段)的方法。这意味着你可以简单地写
+一个路由匹配到的所有路由记录会暴露为 `$route` 对象(还有在导航守卫中的路由对象)的`$route.matched` 数组。我们需要遍历这个数组来检查路由记录中的 `meta` 字段,但是 Vue Router 还为你提供了一个 `$route.meta` 方法,它是一个非递归合并**所有 `meta`** 字段(从父字段到子字段)的方法。这意味着你可以简单地写
 
 ```js
 router.beforeEach((to, from) => {