Skip to content

Refine “Forms” #609

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 2 commits into from
Dec 4, 2017
Merged

Refine “Forms” #609

merged 2 commits into from
Dec 4, 2017

Conversation

Justineo
Copy link
Member

@Justineo Justineo commented Dec 2, 2017

No description provided.

@Justineo Justineo requested a review from Jinjiang December 3, 2017 08:22
@@ -6,11 +6,11 @@ order: 10

## 基础用法

你可以用 `v-model` 指令在表单控件元素上创建双向数据绑定。它会根据控件类型自动选取正确的方法来更新元素。尽管有些神奇,但 `v-model` 本质上不过是语法糖它负责监听用户的输入事件以更新数据,并特别处理一些极端的例子
你可以用 `v-model` 指令在表单输入元素上创建双向数据绑定。它会根据控件类型自动选取正确的方法来更新元素。尽管有些神奇,但 `v-model` 本质上不过是语法糖它负责监听用户的输入事件以更新数据,并对一些极端场景进行一些特殊处理
Copy link
Member

Choose a reason for hiding this comment

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

我看了一下原文“on form input and textarea elements”,觉得倾向于保留 input 和 textarea 的原文,直接展示为代码,即“<input><textarea> 元素”也 OK。

@@ -173,9 +173,9 @@ new Vue({
</script>
{% endraw %}

### 选择列表
### 下拉框
Copy link
Member

Choose a reason for hiding this comment

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

我之前考虑过改这个标题,因为 <select> 在设置 multiple 之后确实就不是下拉形态了,后来还是倾向于“选择列表”。

Copy link
Member Author

Choose a reason for hiding this comment

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

主要是「选择列表」这个东西大家并没有共同的理解……

Copy link
Member

Choose a reason for hiding this comment

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

选择框 你觉得 OK 吗?

Copy link
Member Author

Choose a reason for hiding this comment

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

同意 👍

Copy link
Member

Choose a reason for hiding this comment

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

Btw. 我之前留意过这里是因为我集中整理过一次各级别标题,当时有些 anchors 没连对。今后对标题的修改建议同时搜索一下有没有别处文档的 anchors。我之前搜索的范围是 cn.vuejs.org, vuex/docs/zh-cn, vue-router/docs/zh-cn, vue-loader/docs/zh-cn, vue-test-utils/docs/zh-cn ☹️

Copy link
Member Author

Choose a reason for hiding this comment

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

OK

@@ -314,7 +314,7 @@ new Vue({

## 值绑定

对于单选按钮,勾选框及选择列表选项,`v-model` 绑定的 value 通常是静态字符串 (对于勾选框是逻辑值):
对于单选按钮,复选框及下拉框的选项,`v-model` 绑定的值通常是静态字符串 (对于复选框也可以是布尔值):
Copy link
Member

Choose a reason for hiding this comment

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

同理“下拉框”

@@ -360,7 +360,7 @@ vm.toggle === vm.b
vm.pick === vm.a
```

### 选择列表的选项
### 下拉框的选项
Copy link
Member

Choose a reason for hiding this comment

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

同理“下拉框”


``` html
<!-- 在 "change" 而不是 "input" 事件中更新 -->
<!-- 在change而不是input事件中更新 -->
Copy link
Member

Choose a reason for hiding this comment

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

我理解原文的引号是双关语的意思,但本意不是事件,只是双关语暗指事件。建议把“事件”去掉或换成自然描述:
1 在“change”的时候更新而不是“input”的时候
2 在“改变”的时候更新而不是“输入”的时候

或者索性不翻译双关语了
3 在 change 事件后更新而不是 input 事件后

我倾向于 1 > 3 > 2

@Jinjiang Jinjiang merged commit 3867e66 into vuejs:master Dec 4, 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