Skip to content

Commit 38cd752

Browse files
jeff-feJinjiang
andauthored
docs: Translate 'Omitting parent components' into Chinese (#2400)
* docs: Translate 'Omitting parent components' into Chinese * Apply suggestions from code review --------- Co-authored-by: Jinjiang <[email protected]>
1 parent e978eb8 commit 38cd752

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: packages/docs/zh/guide/essentials/nested-routes.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ const routes = [
136136
]
137137
```
138138

139-
<!-- TODO: translation -->
140-
## Omitting parent components <Badge text="4.1+" />
139+
## 忽略父组件 <Badge text="4.1+" />
141140

142-
We can also take advantage of the parent-child relationship between routes without needing to nest route components. This can be useful for grouping together routes with a common path prefix, or when working with more advanced features, such as [per-route navigation guards](../advanced/navigation-guards#Per-Route-Guard) or [route meta fields](../advanced/meta).
141+
我们还可以仅利用路由的父子关系,但不嵌套路由组件。这对于将具有公共路径前缀的路由分组在一起或使用更高级的功能时很有用,例如:[路由独享的守卫](../advanced/navigation-guards#Per-Route-Guard)[路由元信息](../advanced/meta)
143142

144-
To achieve this, we omit the `component` and `components` options from the parent route:
143+
为了实现这一点, 我们在父路由中省略了 `component` `components` 选项
145144

146145
```js
147146
const routes = [
@@ -156,4 +155,4 @@ const routes = [
156155
]
157156
```
158157

159-
As the parent doesn't specify a route component, the top-level `<router-view>` will skip over the parent and just use the component from the relevant child instead.
158+
由于父级没有指定路由组件,顶级 `<router-view>` 将跳过父级并仅使用子路由组件。

0 commit comments

Comments
 (0)