-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs(zh): sync to d842b6f #2244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vue-router ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Feel free to merge when you think it's ready @Jinjiang ! |
@@ -116,6 +110,10 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = { | |||
text: '路由组件传参', | |||
link: '/zh/guide/essentials/passing-props.html', | |||
}, | |||
{ | |||
text: '活跃的链接', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们之前翻译 activeClass 应该用的是“匹配”?
// 解析出来的路由对象 | ||
route, | ||
// 用在链接里的 href | ||
href, | ||
// 布尔类型的 ref 标识链接是否匹配当前路由 | ||
isActive, | ||
// 布尔类型的 ref 标识链接是否严格匹配当前路由 | ||
isExactActive, | ||
// 导航至该链接的函数 | ||
navigate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里都缺缩进是原文也有问题吗
@@ -39,35 +86,36 @@ export default { | |||
} | |||
}, | |||
created() { | |||
// watch 路由的参数,以便再次获取数据 | |||
// 监听路由的参数,以便再次获取数据 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据翻译约定,watch/observe 都是“侦听”。
@@ -198,7 +198,28 @@ const routes = [ | |||
] | |||
``` | |||
|
|||
请注意,你也可以通过使用[路径 meta 字段](./meta.md)和全局导航守卫来实现类似的行为。 | |||
当配合[嵌套路由](../essentials/nested-routes)使用时,父路由和子路由都可以使用 `beforeEnter`。如果放在父级路由上,路径在具有相同父级的子路由之间移动时不会被触发。例如: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里和下面的 route 要翻译成“路径”吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
route 应该还是翻译成“路由”,我改一下
示例中的 `beforeEnter` 在 `/user/list` 和 `/user/details` 之间移动时不会被调用,因为它们共享相同的父级路由。如果我们直接将 `beforeEnter` 守卫放在 `details` 路由上,那么在这两个路由之间移动时就会被调用。 | ||
|
||
::: tip | ||
你也可以通过使用[路径 meta 字段](./meta.md)和全局导航守卫来实现类似的行为。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
route meta fields 是不是应该要翻译成“路由元信息字段”?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,我觉得可以翻译成“元信息”
Co-authored-by: GU Yiling <justice360@gmail.com>
Co-authored-by: GU Yiling <justice360@gmail.com>
@Justineo 已全部更新,麻烦再看一下🙏 |
Update the Chinese docs
35a9c1b...d842b6f