Skip to content

Commit 6af14a6

Browse files
authored
docs(cn): translate TypeScript section of Route Meta Fields into Chinese (#2091)
* Update meta.md * chore: update checkpoint * Revert "chore: update checkpoint" This reverts commit 6ebc50e.
1 parent 866611f commit 6af14a6

File tree

1 file changed

+5
-7
lines changed
  • packages/docs/zh/guide/advanced

1 file changed

+5
-7
lines changed

packages/docs/zh/guide/advanced/meta.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,15 @@ router.beforeEach((to, from) => {
5858

5959
## TypeScript
6060

61-
<!-- TODO: translation -->
62-
63-
It is possible to type the meta field by extending the `RouteMeta` interface from `vue-router`:
61+
也可以继承来自 `vue-router` 中的 `RouteMeta` 来为 meta 字段添加类型:
6462

6563
```ts
66-
// This can be directly added to any of your `.ts` files like `router.ts`
67-
// It can also be added to a `.d.ts` file. Make sure it's included in
68-
// project's tsconfig.json "files"
64+
// 这段可以直接添加到你的任何 `.ts` 文件中,例如 `router.ts`
65+
// 也可以添加到一个 `.d.ts` 文件中。确保这个文件包含在
66+
// 项目的 `tsconfig.json` 中的 "file" 字段内。
6967
import 'vue-router'
7068

71-
// To ensure it is treated as a module, add at least one `export` statement
69+
// 为了确保这个文件被当作一个模块,添加至少一个 `export` 声明
7270
export {}
7371

7472
declare module 'vue-router' {

0 commit comments

Comments
 (0)