Skip to content

Commit

Permalink
docs(zh): translate the note part of programmatic_navigation to Chine…
Browse files Browse the repository at this point in the history
…se (#2159)

* docs(zh): translate the note part of programmatic_navigation to Chinese

* Update packages/docs/zh/guide/essentials/navigation.md

---------

Co-authored-by: Jinjiang <zhaojinjiang@me.com>
  • Loading branch information
make17better and Jinjiang authored Mar 5, 2024
1 parent 9c1165c commit 0435b74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/docs/zh/guide/essentials/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ sidebarDepth: 0

## 导航到不同的位置

<!-- TODO: translation -->
<!-- **注意:在 Vue 实例中,你可以通过 `$router` 访问路由实例。因此你可以调用 `this.$router.push`。** -->
**Note: The examples below refer to the router instance as `router`. Inside a component, you can access the router using the `$router` property, e.g. `this.$router.push(...)`. If you're using the Composition API, the router is accessible by calling [`useRouter()`](../advanced/composition-api).**
**注意: 下面的示例中的 `router` 指代路由器实例。在组件内部,你可以使用 `$router` 属性访问路由,例如 `this.$router.push(...)`。如果使用组合式 API,你可以通过调用 [`useRouter()`](../advanced/composition-api) 来访问路由器。**

想要导航到不同的 URL,可以使用 `router.push` 方法。这个方法会向 history 栈添加一个新的记录,所以,当用户点击浏览器后退按钮时,会回到之前的 URL。

Expand Down

0 comments on commit 0435b74

Please sign in to comment.