File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
packages/docs/zh/guide/advanced Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff 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" 字段内。
6967import ' vue-router'
7068
71- // To ensure it is treated as a module, add at least one `export` statement
69+ // 为了确保这个文件被当作一个模块,添加至少一个 `export` 声明
7270export {}
7371
7472declare module ' vue-router' {
You can’t perform that action at this time.
0 commit comments