<scroll-view scroll-x="true" class="flex-ard fs14" style="color:#666">
       <div style="margin-left:20rpx;margin-right:20rpx" v-for="(item, index) in materials" :key="index" :class="{'active-1' : currentClassIndex == index}" bindtap="changeMateriaId(item, index)" >{{item.name}}</div>
</scroll-view>
data: {
        materials:[],
        currentClassIndex: 0,

    },
methods: {
     
     changeMateriaId(item, index){
           this.currentClassIndex = index
     }
 }

 

相关文章:

  • 2021-05-04
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案