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

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2021-09-02
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
相关资源
相似解决方案