el-table 行操作按钮鼠标移入移出事件

鼠标移入、移出分别用 @mouseenter 和 @mouseleave

<el-table-column min-width="60" align="center" label="操作">

                <template scope="{row, column, $index}">

                <ss-tip-icon @mouseenter.native="showDetailClick(row,$event);" @mouseleave.native="hiddenDetailClick(row);" :iconType="row.detailIcon?row.detailIcon:'detail'" tooltip="详情"></ss-tip-icon>

                </template>

 </el-table-column>

methods

hiddenDetailClick(row){

        this.showDetailFlag = false;

        this.showDetail = [];

        row.detailIcon = "detail";

},

showDetailClick(row, e){

        let _row = row;

       let proofno = _row.proofno;

        this.showDetail = Object.assign({}, _row);

        this.showDetailFlag = true;

        _row.detailIcon = "detailHover";

        _row.proofno = proofno+" ";

        this.x = e.clientX-600;

         this.y = e.clientY;

        this.$nextTick(() => {

        let x = this.$util.getAbsoluteLeft(this.$refs.childsTab.$el);

        let y = this.$util.getAbsoluteTop(this.$refs.childsTab.$el);

        if(this.y > y){

                 this.y = y;

          }

        })

    }

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容