Skip to content
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

src/v2/guide/list.md 校对完成 #360

Merged
merged 2 commits into from
Jul 7, 2017
Merged

src/v2/guide/list.md 校对完成 #360

merged 2 commits into from
Jul 7, 2017

Conversation

dear-lizhihua
Copy link
Collaborator

src/v2/guide/list.md 校对完成

@dear-lizhihua
Copy link
Collaborator Author

@aladdin-add

@@ -234,9 +234,9 @@ new Vue({ el: '#range' })
</my-component>
```

不自动注入 `item` 到组件里的原因是,因为这使得组件会紧密耦合到 `v-for` 如何运作。在一些情况下,明确数据的来源可以使组件可重用
没有通过 v-for 将 `item` 自动注入到组件中的原因是,一旦自动注入,就会使得组件与 `v-for` 指令的运行方式紧密耦合(tightly coupled)在一起。通过显式声明组件数据来源,可以使得组件可重用于其他场景(reusable in other situation)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以使得组件可重用于其他场景(reusable in other situation)。

感觉括弧中的英文可以不要,一般只有在术语或者译文不能完整表达原义时才需要。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改。


### 变异方法

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉"变异方法“没有必要改,很多人应该已经接受了这个翻译,改过来反倒不易理解。just my 2c.看看其他人怎么说吧。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个说起来有点丢脸,这名词是我去年翻译时候想出来的,然后隔了大半年没看 Vue 文档。
当时我在看源码,误以为这里提到的 mumation method 指的是 Vue 篡改劫持「原生 Array.prototype 方法」后的方法,其实这里说的很明白,就是指「会修改数组的原生 Array.prototype 方法」,而不是指那个篡改劫持方法,那个篡改劫持方法其实在 381 行提到:

Vue 将观察数组(observed array)的变化数组方法(mutation method)包裹起来,以便在调用这些方法时,也能够触发视图更新。这些包裹的方法如下:

所以原来的翻译都是错误的,只会让人产生歧义。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

变化数组方法是会对原数组操作的数组方法,如 pop(), shift(), unshift(), splice(), sort()reverse()
非变化数组方法是会对原数组操作、返回新数组的数组方法,如 filter(), concat()slice()

Copy link

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dear-lizhihua dear-lizhihua merged commit ec60ba6 into volksbright:2.0-cn Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants