鼠标 移入移出 事件
作者:互联网
第一种
<div v-on:mouseover="handleOver($event)" v-on:mouseout="handleOut($event)"></div>
handleOver (e) {
console.log('移入:', e);
e.currentTarget.className = "xxx";
},
handleOut (e) {
console.log('移出:', e);
e.currentTarget.className = "yyy";
},
第二种
<div @mouseover="mouseOver" @mouseleave="mouseLeave"></div>
mouseOver () {},
mouseLeave () {}
标签:console,鼠标,移出,className,currentTarget,移入,log 来源: https://www.cnblogs.com/yu-heng-xing/p/16409181.html