File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,11 @@ data: {
109
109
<div v-bind:class =" [{ active: isActive }, errorClass]" >
110
110
```
111
111
112
- ### 和组件一起使用
112
+ ### 用在组件上
113
113
114
- > 这个部分假设你已经有了对于 [ Vue组件 ] ( components.html ) 的一些了解。尽管跳过这段好了,过会儿再回来看也是可以的 。
114
+ > 这个章节假设你已经对 [ Vue 组件 ] ( components.html ) 有一定的了解。当然你也可以跳过这里,稍后再回过头来看 。
115
115
116
- 当你在一个定制的组件上用到` class ` 属性的时候,这些类将被添加到根元素上面,这个元素上已经存在的类不会被覆盖。
116
+ 当你在一个定制的组件上用到 ` class ` 属性的时候,这些类将被添加到根元素上面,这个元素上已经存在的类不会被覆盖。
117
117
118
118
例如,如果你声明了这个组件:
119
119
@@ -135,13 +135,13 @@ HTML最终将被渲染成为:
135
135
<p class =" foo bar baz boo" >Hi</p >
136
136
```
137
137
138
- 同样的适用于绑定HTML class:
138
+ 同样的适用于绑定 HTML class :
139
139
140
140
``` html
141
141
<my-component v-bind:class =" { active: isActive }" ></my-component >
142
142
```
143
143
144
- 当` isActive ` 为true的时候,HTML将被渲染成为 :
144
+ 当 ` isActive ` 为 true 的时候,HTML 将被渲染成为 :
145
145
146
146
``` html
147
147
<div class =" foo bar active" ></div >
Original file line number Diff line number Diff line change @@ -362,11 +362,11 @@ vm.selected.number // -> 123
362
362
<input v-model.trim =" msg" >
363
363
```
364
364
365
- ## ` v-model ` 与组件
365
+ ## ` v-model ` 与组件
366
366
367
367
> 如果你对组件还不熟悉,跳过这里即可。
368
368
369
- HTML的内置input类型可能不会总是能满足你的需求 。幸运的是,Vue的组件系统允许你创建一个具有自定义行为的并且可重用的inputs。这些inputs甚至可以与 ` v-model ` 一起使用!想了解更多,阅读组件文档中的[ 自定义inputs] ( components.html#Form-Input-Components-using-Custom-Events ) 。
369
+ HTML 的内置 input 类型可能不会总是能满足你的需求 。幸运的是, Vue 的组件系统允许你创建一个具有自定义行为的并且可重用的 inputs 。这些 inputs 甚至可以与 ` v-model ` 一起使用!想了解更多,阅读组件文档中的 [ 自定义inputs] ( components.html#Form-Input-Components-using-Custom-Events ) 。
370
370
371
371
***
372
372
You can’t perform that action at this time.
0 commit comments