vue指令v-for用法

<div id="app">
<label for="r1">修改颜色</label><input type="checkbox" v-model="class1" id="r1">
<div v-bind:class="{'class1': class1}">directiva v-bind:class</div>
</div>
<style type="text/css">
.class1{
background: #444;
color: #eee;
}
</style>
<script type="text/javascript">
new Vue({
el:"#app",
data:{
class1:false
}
})
</script>

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: