Skip to content

Commit c8fd879

Browse files
authored
docs(zh): translate installation#Package-managers
1 parent ad65dc2 commit c8fd879

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages/docs/zh/installation.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010

1111
<!--/email_off-->
1212

13-
<!-- TODO: translation -->
13+
这将把 Vue Router 暴露在全局的 `VueRouter` 对象上,例如 `VueRouter.createRouter(...)`
1414

15-
This will expose Vue Router via a global `VueRouter` object, e.g. `VueRouter.createRouter(...)`.
15+
## 包管理器
1616

17-
## Package managers
18-
19-
If you have an existing project that uses a JavaScript package manager, you can install Vue Router from the npm registry:
17+
如果您有一个使用 JavaScript 包管理器的现有项目,你可以从 npm registry 中安装 Vue Router:
2018

2119
::: code-group
2220

@@ -34,7 +32,7 @@ pnpm add vue-router@4
3432

3533
:::
3634

37-
If you're starting a new project, you might find it easier to use the [create-vue](https://github.com/vuejs/create-vue) scaffolding tool, which creates a Vite-based project with the option to include Vue Router:
35+
如果你要开始一个新项目,你可能会发现使用 [create-vue](https://github.com/vuejs/create-vue) 脚手架工具更容易,它可以创建一个基于 Vite 的项目,并提供了在项目中包含 Vue Router 的选项:
3836

3937
::: code-group
4038

@@ -52,6 +50,6 @@ pnpm create vue
5250

5351
:::
5452

55-
You'll be prompted with some questions about the kind of project you want to create. If you choose to install Vue Router, the example application will also demonstrate some of Vue Router's core features.
53+
你会被问到关于你想创建的项目类型的一些问题。如果你选择安装 Vue Router,示例应用还将演示一些 Vue Router 的核心功能。
5654

57-
Projects using package managers will typically use ES modules to access Vue Router, e.g. `import { createRouter } from 'vue-router'`.
55+
使用包管理器的项目通常会使用 ES 模块来访问 Vue Router,例如 `import { createRouter } from 'vue-router'`

0 commit comments

Comments
 (0)