vue之v-bind:style
<div class="collect" @click="collected=!collected"> <i class="fa fa-heart" :color': collected ?'rgb(240, 20, 20)':'rgb(147, 153, 159)'}"></i> <span class="text" :color': collected ?'rgb(77, 85, 93)':'rgb(147, 153, 159)'}">{{collected?'已收藏':'收藏'}}</span>
</div>
- 上一篇 »Vue v-bind v-model的使用
- 下一篇 »vue动态属性