File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ order: 6
10
10
11
11
### Использование объектов
12
12
13
- Для динамического задания или удаления CSS классов мы можем передать в директиву ` v-bind:class ` объект:
13
+ Для динамического задания или удаления CSS- классов мы можем передать в директиву ` v-bind:class ` объект:
14
14
15
15
``` html
16
16
<div v-bind:class =" { active: isActive }" ></div >
@@ -121,7 +121,7 @@ data: {
121
121
122
122
``` js
123
123
Vue .component (' my-component' , {
124
- template: ' <p class="foo bar">Hi </p>'
124
+ template: ' <p class="foo bar">Привет </p>'
125
125
})
126
126
```
127
127
@@ -134,7 +134,7 @@ Vue.component('my-component', {
134
134
В результате рендеринга получим:
135
135
136
136
``` html
137
- <p class =" foo bar baz boo" >Hi </p >
137
+ <p class =" foo bar baz boo" >Привет </p >
138
138
```
139
139
140
140
То же самое справедливо для связывания классов с данными:
@@ -146,7 +146,7 @@ Vue.component('my-component', {
146
146
Если ` isActive ` истинно, результирующий HTML будет:
147
147
148
148
``` html
149
- <p class =" foo bar active" >Hi </p >
149
+ <p class =" foo bar active" >Привет </p >
150
150
```
151
151
152
152
## Связывание inline-стилей
You can’t perform that action at this time.
0 commit comments