el-popover放在el-table中点击无反应问题

我们想在table中给btn加弹框但是 el-popover点击按钮没有任何反应
思考 :通过插槽去添加这个组件el-popover的id是否绑定了一个值
解决思路 :给每个el-popover都加上单独的id

效果 :

代码 给每个组件都绑定ref

html 复制代码
<template slot-scope="scope">
                                <div>
                                    <el-popover
                                        placement="left"
                                        v-else-if="scope.row.cmiBusiApproveInfo" 
                                        width="400"
                                        :ref="`popover-${scope.$index}`">
                                        <p>审批意见</p>
                                        <el-input
                                            type="textarea"
                                            placeholder="请输入内容"
                                            :rows="6"
                                            v-model="scope.row.approve"
                                            show-word-limit
                                            >
                                        </el-input>
                                        <div style="text-align: center; margin: 10px">
                                                <el-button size="small"  @click="deltaskList(scope.$index)">取消
                                                </el-button>
                                                <el-button size="small"  type="danger"  @click="confirm(scope.row,'reject',scope.$index)">驳回
                                                </el-button>
                                                <el-button size="small" type="primary" @click="confirm(scope.row,'agree',scope.$index)">确定
                                                </el-button>
                                        </div>

                                        <el-button slot="reference"  @click="auditClick(scope.row,scope.$index)" size="mini" >审核</el-button>
                                    </el-popover>

   
                                </div>
                            </template>

通过他的id去控制关闭

javascript 复制代码
 deltaskList(index){
            this.$refs[`popover-${index}`].doClose()
        },
相关推荐
群联云防护小杜6 分钟前
深度隐匿源IP:高防+群联AI云防护防绕过实战
运维·服务器·前端·网络·人工智能·网络协议·tcp/ip
DanB2419 分钟前
html复习
javascript·microsoft·html
汉得数字平台24 分钟前
【鲲苍提效】全面洞察用户体验,助力打造高性能前端应用
前端·前端监控
花海如潮淹31 分钟前
前端性能追踪工具:用户体验的毫秒战争
前端·笔记·ux
_丿丨丨_5 小时前
XSS(跨站脚本攻击)
前端·网络·xss
天天进步20155 小时前
前端安全指南:防御XSS与CSRF攻击
前端·安全·xss
呼啦啦呼啦啦啦啦啦啦6 小时前
利用pdfjs实现的pdf预览简单demo(包含翻页功能)
android·javascript·pdf
拾光拾趣录8 小时前
括号生成算法
前端·算法
拾光拾趣录9 小时前
requestIdleCallback:让你的网页如丝般顺滑
前端·性能优化
前端 贾公子9 小时前
vue-cli 模式下安装 uni-ui
前端·javascript·windows