Skip to content
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
4 changes: 2 additions & 2 deletions src/v2/cookbook/debugging-in-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
<!-- todo: translation -->
<p class="tip">We're assuming the port to be `8080` here. If it's not the case (for instance, if `8080` has been taken and Vue CLI automatically picks another port for you), just modify the configuration accordingly.</p>

点击在 Activity Bar 里的 Debugger 图标来到 Debug 视图,然后点击那个齿轮图标来配置一个 `launch.json` 的文件,选择 **Chrome/Firefox: Launch** 环境。然后将生成的 `launch.json` 的内容替换成为相应的配置:
点击在 Activity Bar 里的 Debugger 图标来到 Debug 视图,然后点击那个齿轮图标来配置一个 `launch.json` 的文件,选择 **Chrome/FirefoxLaunch** 环境。然后将生成的 `launch.json` 的内容替换成为相应的配置:

![添加 Chrome 配置](/images/config_add.png)

Expand Down Expand Up @@ -91,7 +91,7 @@ module.exports = {
npm run serve
```

3. 来到 Debug 视图,选择 **'vuejs: chrome/firefox'** 配置,然后按 <kbd>F5</kbd> 或点击那个绿色的 play 按钮。
3. 来到 Debug 视图,选择**‘vuejschrome/firefox’**配置,然后按 <kbd>F5</kbd> 或点击那个绿色的 play 按钮。

4. 随着一个新的浏览器实例打开 `http://localhost:8080`,你的断点现在应该被命中了。

Expand Down
4 changes: 2 additions & 2 deletions src/v2/cookbook/serverless-blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import Butter from 'buttercms';
const butter = Butter('your_api_token');
```

使用 CDN:
使用 CDN

```html
<script src="https://cdnjs.buttercms.com/buttercms-1.1.0.min.js"></script>
Expand Down Expand Up @@ -302,4 +302,4 @@ created() {

## 总结

差不多就是这些了!现在你已经在自己的应用中拥有了一个可以正常工作的 CMS 博客。我们希望这份教程可以帮助你,使你的 Vue.js 开发体验更有乐趣 :)
差不多就是这些了!现在你已经在自己的应用中拥有了一个可以正常工作的 CMS 博客。我们希望这份教程可以帮助你,使你的 Vue.js 开发体验更有乐趣 🙂
2 changes: 1 addition & 1 deletion src/v2/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js

## 开发版本

**重要**: GitHub 仓库的 `/dist` 文件夹只有在新版本发布时才会提交。如果想要使用 GitHub 上 Vue 最新的源码,你需要自己构建!
**重要**GitHub 仓库的 `/dist` 文件夹只有在新版本发布时才会提交。如果想要使用 GitHub 上 Vue 最新的源码,你需要自己构建!

``` bash
git clone https://github.com/vuejs/vue.git node_modules/vue
Expand Down
8 changes: 4 additions & 4 deletions src/v2/guide/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var example2 = new Vue({

结果:

{% raw%}
{% raw %}
<ul id="example-2" class="demo">
<li v-for="(item, index) in items">
{{ parentMessage }} - {{ index }} - {{ item.message }}
Expand Down Expand Up @@ -257,7 +257,7 @@ Vue 将被侦听的数组的变异方法进行了包裹,所以它们也将会

### 替换数组

变异方法,顾名思义,会改变调用了这些方法的原始数组。相比之下,也有非变异 (non-mutating method) 方法,例如 `filter()`、`concat()` 和 `slice()` 。它们不会改变原始数组,而**总是返回一个新数组**。当使用非变异方法时,可以用新数组替换旧数组:
变异方法,顾名思义,会改变调用了这些方法的原始数组。相比之下,也有非变异 (non-mutating method) 方法,例如 `filter()`、`concat()` 和 `slice()`。它们不会改变原始数组,而**总是返回一个新数组**。当使用非变异方法时,可以用新数组替换旧数组:

``` js
example1.items = example1.items.filter(function (item) {
Expand Down Expand Up @@ -457,7 +457,7 @@ methods: {

上面的代码将只渲染未完成的 todo。

而如果你的目的是有条件地跳过循环的执行,那么可以将 `v-if` 置于外层元素 (或 [`<template>`](conditional.html#在-lt-template-gt-中配合-v-if-条件渲染一整组))上。如:
而如果你的目的是有条件地跳过循环的执行,那么可以将 `v-if` 置于外层元素 (或 [`<template>`](conditional.html#在-lt-template-gt-中配合-v-if-条件渲染一整组)) 上。如:

``` html
<ul v-if="todos.length">
Expand All @@ -472,7 +472,7 @@ methods: {

> 这部分内容假定你已经了解[组件](components.html)相关知识。你也完全可以先跳过它,以后再回来查看。

在自定义组件上,你可以像在任何普通元素上一样使用 `v-for`
在自定义组件上,你可以像在任何普通元素上一样使用 `v-for`。

``` html
<my-component v-for="item in items" :key="item.id"></my-component>
Expand Down
Loading