File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,10 @@ order: 10
10
10
11
11
<p class =" tip " >`v-model` 会忽略所有表单元素的 `value`、`checked`、`selected` 特性的初始值而总是将 Vue 实例的数据作为数据来源。你应该通过 JavaScript 在组件的 `data` 选项中声明初始值。</p >
12
12
13
- <!-- todo: translation -->
14
- ` v-model ` internally uses different properties and emits different events for different input elements:
15
- - text and textarea elements use ` value ` property and ` input ` event;
16
- - checkboxes and radiobuttons use ` checked ` property and ` change ` event;
17
- - select fields use ` value ` as a prop and ` change ` as an event.
13
+ ` v-model ` 在内部使用不同的属性为不同的输入元素并抛出不同的事件:
14
+ - text 和 textarea 元素使用 ` value ` 属性和 ` input ` 事件;
15
+ - checkbox 和 radio 使用 ` checked ` 属性和 ` change ` 事件;
16
+ - select 字段将 ` value ` 作为 prop 并将 ` change ` 作为事件。
18
17
19
18
<p class =" tip " id =" vmodel-ime-tip " >对于需要使用[输入法](https://zh.wikipedia.org/wiki/%E8%BE%93%E5%85%A5%E6%B3%95) (如中文、日文、韩文等) 的语言,你会发现 `v-model` 不会在输入法组合文字过程中得到更新。如果你也想处理这个过程,请使用 `input` 事件。</p >
20
19
You can’t perform that action at this time.
0 commit comments