vue的鼠标事件
-
无效 (添加.native)
<el-card @mouseenter.native="markShow(item)" @mouseleave.native="markOut(item)">
-
悬浮添加一层效果会闪烁 (添加层加pointer-events: none;标签会不接受鼠标事件)
<div> <div class="mark" v-if="item.show"> <el-button type="primary" round icon="el-icon-video-play">点击查看视频</el-button> </div> </div> .mark{ width: 100%; background-color: #00000096; position: absolute; top: 0; bottom: 0 !important; text-align: center; pointer-events: none; z-index: 2; }