其他分享
首页 > 其他分享> > vue实现移入移出事件

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实现鼠标移入移出事件

标签:index,vue,移出,current,移入,seen
来源: https://www.cnblogs.com/dagongren/p/14129600.html