Skip to content

docs(zh): typos in #2016 #2089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module.exports = {

### lintOnSave

- Type: `boolean` | `error`
- Type: `boolean` | `'error'`
- Default: `true`

是否在开发环境下通过 [eslint-loader](https://github.com/webpack-contrib/eslint-loader) 在每次保存时 lint 代码。这个值会在 [`@vue/cli-plugin-eslint`](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint) 被安装之后生效。
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/dev-guide/plugin-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default {
<%# END_REPLACE %>
```

#### 文件名都极端情况
#### 文件名的极端情况

如果你想要渲染一个以点开头的模板文件 (例如 `.env`),则需要遵循一个特殊的命名约定,因为以点开头的文件会在插件发布到 npm 的时候被忽略:

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/build-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Web Components 模式不支持 IE11 及更低版本。[更多细节](https://git
vue-cli-service build --target wc --name my-element [entry]
```

注意这里的入口应该是一个 `*.vue` 文件。Vue CLI 将会把这个组件自动包裹并注册为 Web Components 组件,无需在 `main.js` 里做这件事。你也完全可以在开发时以一个 demo app 使用 `main.js`。
注意这里的入口应该是一个 `*.vue` 文件。Vue CLI 将会把这个组件自动包裹并注册为 Web Components 组件,无需在 `main.js` 里自行注册。也可以在开发时把 `main.js` 作为 demo app 单独使用

该构建将会产生一个单独的 JavaScript 文件 (及其压缩后的版本) 将所有的东西都内联起来。当这个脚本被引入网页时,会注册自定义组件 `<my-element>`,其使用 `@vue/web-component-wrapper` 包裹了目标的 Vue 组件。这个包裹器会自动代理属性、特性、事件和插槽。请查阅 [`@vue/web-component-wrapper` 的文档](https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-web-component-wrapper/README.md)了解更多细节。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/guide/cli-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ npx vue-cli-service serve
你可以通过 `vue ui` 命令使用 GUI 运行更多的特性脚本。
:::

这里有一个 GUI 的 Webpack Analyzer:
这里有一个 GUI 的 webpack Analyzer:

![UI Webpack Analyzer](/ui-analyzer.png)
![UI webpack Analyzer](/ui-analyzer.png)

## vue-cli-service serve

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $color = red;

### 自动化导入

如果你想自动化导入文件 (用于颜色、变量、mixin……),你可以使用 [style-resources-loader](https://github.com/yenshih/style-resources-loader)。这里有一个关于 stylus 的在每个单文件组件和 stylus 文件中导入 `./src/styles/imports.styl` 的例子:
如果你想自动化导入文件 (用于颜色、变量、mixin……),你可以使用 [style-resources-loader](https://github.com/yenshih/style-resources-loader)。这里有一个关于 Stylus 的在每个单文件组件和 Stylus 文件中导入 `./src/styles/imports.styl` 的例子:

```js
// vue.config.js
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/mode-and-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ console.log(process.env.VUE_APP_SECRET)
所有解析出来的环境变量都可以在 `public/index.html` 中以 [HTML 插值](./html-and-static-assets.md#插值)中介绍的方式使用。

::: tip 提示
你可以在 `vue.config.js` 文件中计算环境变量。它们仍然需要以 `VUE_APP_` 前缀开头。这可以用于版本信息 `process.env.VUE_APP_VERSION = require('./package.json').version`
你可以在 `vue.config.js` 文件中计算环境变量。它们仍然需要以 `VUE_APP_` 前缀开头。这可以用于版本信息 `process.env.VUE_APP_VERSION = require('./package.json').version`
:::

## 只在本地有效的变量
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/plugins-and-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ vue add vuex
}
```

每个文件都需要暴露一个函数,将插件 API 作为第一个参数携带。关于插件 API 的更多信息可以查阅[插件开发指南](../dev-guide/plugin-dev.md)。
每个文件都需要暴露一个函数,接受插件 API 作为第一个参数。关于插件 API 的更多信息可以查阅[插件开发指南](../dev-guide/plugin-dev.md)。

你也可以通过 `vuePlugins.ui` 选项添加像 UI 插件一样工作的文件:

Expand Down