vue-bind使用
672 ワード
v-bindプロパティバインドプロパティとスタイル
(1)バインド属性
(2)バインドスタイル
このスタイルはdataにスタイルを書きます
(3)classキーワードをバインド------イベントをクリックしてclassのブール値viewビューの
cssの
jsの
(1)バインド属性
(2)バインドスタイル
このスタイルはdataにスタイルを書きます
(3)classキーワードをバインド------イベントをクリックしてclassのブール値viewビューの
cssの
.active
color:white;
background-color:green;
}
jsの
data:{
isActive:false
}
method:{
toggle:function(){
this.isActive = true;
}
}