template

 <ul>
   <li v-for="(relation,index) in relations" v-bind:id="relation.id" v-bind:id="relation.id" v-bind:class="{checked:index==nowIndex}" v-on:click="relationClick(index)">
    <i>
  </ul>

data

nowIndex:0

methods

changeValue(index){
       this.isActive=index;
  }`

style

.checked{
  background: #eff4f7;
 }

原文:https://www.jb51.net/article/146114.htm

转载于:https://www.cnblogs.com/ssjf/p/11169517.html

Logo

前往低代码交流专区

更多推荐