<ul>>
    <li class="" v-on:mouseover="changeActive($event)" v-on:mouseout="removeActive($event)"></li>
</ul>
methods:{
        // 鼠标移入加入class
      changeActive($event){
             $event.currentTarget.className="active";
      },
      removeActive($event){
             $event.currentTarget.className="";
      }
}

 

 

Logo

前往低代码交流专区

更多推荐