vue点击切换class

  • {{index}}.{{item}}
    const app = new vue({
        el:"#app",
        data:{
            movies:['爸爸去哪儿',"大师兄","最强大脑"],
            currentIndex:0
        },
        methods:{
            liclick(index){
               this.currentIndex = index
          }
        }
    })

 

你可能感兴趣的:(vue点击切换class)