vue easiest to switch into active

 <li :key="index" class="clearfix" :class="timeIndex === index ? 'clearfix hover' : 'clearfix' " @mouseover="selectTimer(index)">
selectTimer(index) {
      this.timeIndex = index
    },

Participation by the article: https: //blog.csdn.net/yibowanbo/article/details/79703575

Guess you like

Origin www.cnblogs.com/tangbuluo/p/11356205.html