<li v-for="(item, index) in correList" v-on:click="clickTopUp(item.id)" v-bind:class='{actives:item.id==faceValue}'>
{{item.money}}<br><span>消耗{{item.integrals}}积分</span></li>
export default{
    data () {
      return {
        faceValue: "0",
        correList: '',
      }
    },
     methods:{
      clickTopUp:function(id){
        this.faceValue = id;
        console.log("id======",id)
      }
    },
.actives{ 
      border: 1px solid #1e93ff;
      color: #1e93ff;
    }
Logo

前往低代码交流专区

更多推荐