剛開始是這樣的當鼠標經(jīng)過時出現(xiàn)“修改字樣”<div v-for="item in list" @mouseover="hover()"> <span>{{item.icon}}</span> <span>{{item.text}}</span> <span v-show="false">修改</span></div>----------------------------- data:{ list:[ { id:1, icon:"image", text:58 }, { id:2, icon:"icon", text:60 }, { id:3, icon:"pic", text:80 }, ] }, methods:{ //鼠標經(jīng)過 hover:function(){ //這里的邏輯該怎么寫呢 //如何判斷我鼠標經(jīng)過的是第幾個,讓他對應的v-show變?yōu)閠rue呢? } },
vue鼠標滑過事件
MYYA
2018-07-15 19:17:40