vue鼠标划过移入移出触发函数介绍
<ul>>
<li class=
""
v-on:mouseover=
"changeActive($event)"
v-on:mouseout=
"removeActive($event)"
></li>
</ul>
methods:{
// 鼠标移入加入class
changeActive($event){
$event.currentTarget.className=
"active"
;
},
removeActive($event){
$event.currentTarget.className=
""
;
}
}