vue鼠标移入移出 vue实现鼠标移入移出事件代码实例

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

vue鼠标移入移出 vue实现鼠标移入移出事件代码实例

Eternal-memory   2021-03-30 我要评论


<div class="index_tableTitle clearfix" v-for="(item,index) in table_tit">
     <div class="indexItem">
      <span :title="item.name">{{item.name}}</span>
      <span class="mypor">
       <i class="icon" @mouseenter="enter(index)" @mouseleave="leave()"></i>
       <div v-show="seen&&index==current" class="index-show">
        <div class="tip_Wrapinner">{{item.det}}</div>
       </div>
      </span>
     </div>
    </div>
export default {
  data(){
   return{
    seen:false,
    current:0
   }
  },
  methods:{
   enter(index){
    this.seen = true;
    this.current = index;
   },
   leave(){
    this.seen = false;
    this.current = null;
   }
  }
 }
 

以上所述是小编给大家介绍的vue实现鼠标移入移出事件详解整合,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们