vue中对鼠标划过进行处理
鼠标事件进行监听
需求中,在一个table
(组件)表中,对于其中一列(该列为图片列),当鼠标划过该列的某个单元格子(图片)时,需要展示出该单元格子对应的遮罩层
翻阅了一些博客,发现好多都提到了mouse事件,如mouseover、mouseout、mouseenter、mouseleave,在之后我自己也通过这种方法进行了尝试。
<template>
<el-table
:data="tableData"
stripe
style="width: 100%">
<el-table-column
prop="pic"
label="图片"
width="180">
<template slot-scope="scope">
<div slot="wrapper" class=&