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

相关文章:

  • 2022-01-18
  • 2021-05-19
  • 2021-10-11
  • 2021-11-29
  • 2022-12-23
  • 2021-09-11
  • 2021-11-30
猜你喜欢
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
相关资源
相似解决方案