-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Refine “Forms” #609
Conversation
src/v2/guide/forms.md
Outdated
@@ -6,11 +6,11 @@ order: 10 | |||
|
|||
## 基础用法 | |||
|
|||
你可以用 `v-model` 指令在表单控件元素上创建双向数据绑定。它会根据控件类型自动选取正确的方法来更新元素。尽管有些神奇,但 `v-model` 本质上不过是语法糖,它负责监听用户的输入事件以更新数据,并特别处理一些极端的例子。 | |||
你可以用 `v-model` 指令在表单输入元素上创建双向数据绑定。它会根据控件类型自动选取正确的方法来更新元素。尽管有些神奇,但 `v-model` 本质上不过是语法糖。它负责监听用户的输入事件以更新数据,并对一些极端场景进行一些特殊处理。 |
There was a problem hiding this comment.
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。
src/v2/guide/forms.md
Outdated
@@ -173,9 +173,9 @@ new Vue({ | |||
</script> | |||
{% endraw %} | |||
|
|||
### 选择列表 | |||
### 下拉框 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我之前考虑过改这个标题,因为 <select>
在设置 multiple 之后确实就不是下拉形态了,后来还是倾向于“选择列表”。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要是「选择列表」这个东西大家并没有共同的理解……
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
选择框 你觉得 OK 吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同意 👍
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
src/v2/guide/forms.md
Outdated
@@ -314,7 +314,7 @@ new Vue({ | |||
|
|||
## 值绑定 | |||
|
|||
对于单选按钮,勾选框及选择列表选项,`v-model` 绑定的 value 通常是静态字符串 (对于勾选框是逻辑值): | |||
对于单选按钮,复选框及下拉框的选项,`v-model` 绑定的值通常是静态字符串 (对于复选框也可以是布尔值): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同理“下拉框”
src/v2/guide/forms.md
Outdated
@@ -360,7 +360,7 @@ vm.toggle === vm.b | |||
vm.pick === vm.a | |||
``` | |||
|
|||
### 选择列表的选项 | |||
### 下拉框的选项 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同理“下拉框”
src/v2/guide/forms.md
Outdated
|
||
``` html | ||
<!-- 在 "change" 而不是 "input" 事件中更新 --> | ||
<!-- 在“change”而不是“input”事件中更新 --> |
There was a problem hiding this comment.
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
No description provided.