本文實例為大家分享了vue實現(xiàn)鼠標移入移出事件的具體代碼,供大家參考,具體內容如下
<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實現(xiàn)鼠標移入移出事件詳解整合,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網(wǎng)網(wǎng)站的支持!
新聞熱點
疑難解答