vue 不同的条件添加不同的类

<el-button  v-for="(item,index) in mTod" :key="index" :class="[{'rmb':index === 0}, {'dollar':index === 1},{'active':index === idx}]" @click="currencyConverter(index)">{{item}}</el-button>

  

posted @ 2019-07-31 18:44  董七  阅读(1362)  评论(0编辑  收藏  举报