* docs(cn): translate `Global injections within guards` section
* Update navigation-guards.md
* chore: update checkpoint
* Revert "chore: update checkpoint"
This reverts commit
8aa9cf74941bd6a5cfdb2a9451a8826355ad66ba.
* remove TODO comment
* Update packages/docs/zh/guide/advanced/navigation-guards.md
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
---------
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
了解更多关于 navigation failures 的信息在[它的指南](./navigation-failures.md)中。
-<!-- TODO: translation -->
-## Global injections within guards
+## 在守卫内的全局注入
-Since Vue 3.3, it is possible to use `inject()` within navigation guards. This is useful for injecting global properties like the [pinia stores](https://pinia.vuejs.org). Anything that is provided with `app.provide()` is also accessible within `router.beforeEach()`, `router.beforeResolve()`, `router.afterEach()`:
+从 Vue 3.3 开始,你可以在导航守卫内使用 `inject()` 方法。这在注入像 [pinia stores](https://pinia.vuejs.org) 这样的全局属性时很有用。在 `app.provide()` 中提供的所有内容都可以在 `router.beforeEach()`、`router.beforeResolve()`、`router.afterEach()` 内获取到:
```ts
// main.ts