时间: 2020-02-19|tag:189次围观|0 条评论

vue mobile模式鼠标移入移出动作,vue 移入移出事件

<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>

//js

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实现鼠标移入移出事件
   

还没有人抢沙发呢~