el-table鼠标移入自定义显示
<el-table-column prop="index" label="需求人" min-width="8%" sortable="custom"> <template slot-scope="scope"> <el-popover placement="top" trigger="hover"> //利用element ui 的el-popover 弹出框展示悬浮内容, <br /> placement="top"为弹出层出现的位置为顶部,trigger="hover"触发方式为悬浮 <div>123132123123123</div> <div slot="reference" class="name-wrapper"> <div @mouseover="mouseOver(scope.row)" @mouseleave="mouseLeave">{{ scope.row.index }}</div> </div> </el-popover> </template> </el-table-column>
鼠标移入移出触发函数
mouseOver(e) { console.log(e) }, mouseLeave() { console.log('456') },