vue实现移入移出事件

Html

<i class="icon" @mouseenter="enter(index)" @mouseleave="leave()"></i>

JS

methods:{
      enter(index){
        this.seen = true;
        this.current = index;
      },
      leave(){
        this.seen = false;
        this.current = null;
      }
    }

原文:vue实现鼠标移入移出事件

原文地址:https://www.cnblogs.com/dagongren/p/14129600.html