当前位置: 首页 > news >正文

table表格中使用el-popover 无效问题解决

实例只针对单个的按钮管用在表格里每一列都有el-popover相当于是v-for遍历了 所以我们在触发按钮的时候并不是单个的触发某一个 

主要执行 代码

  <el-popover placement="left" :ref="`popover-${scope.$index}`">   动态绑定了ref

关闭弹窗  执行deltaskList

  <el-table-column align="center" label="操作" fixed="right" width="300px"><!-- v-buttonShow="5010403" --><template slot-scope="scope"><el-popover placement="left" :ref="`popover-${scope.$index}`"><div style="border-bottom: 1px solid #ebeef5; margin-bottom: 10px; padding-bottom: 6px">设置账期</div><div style="display: flex; flex-direction: column">仅记录账期,并不会影响出账流程~<el-selectv-model="setAccountVal"clearablefilterableplaceholder="请选择结算方式"style="width: 260px; margin-top: 15px"size="small"><el-optionv-for="(item, index) in paymentTermsList":key="index":label="item.name":value="item.value"></el-option></el-select></div><div style="text-align: right; margin: 0px; margin-top: 15px"><el-button type="text" @click="deltaskList(scope.$index)">取消 </el-button><el-button size="small" type="primary" @click="popConfirmSub(scope.$index)">确定 </el-button></div><el-buttonstyle="margin-left: 10px"slot="reference"type="text"v-if="mode == '0'"@click="setAccountBtn(scope.row)">设置账期</el-button></el-popover></template></el-table-column>// 设置账期setAccountBtn (row, index) {let findItem = this.paymentTermsList.find((item) => item.name === row.paymentTerms)this.setAccountVal = findItem.valuethis.setAccountBtnRow = row},// 确定async popConfirmSub (index) {if (this.setAccountVal === '') return this.$message.error('请选择账期')await newFranchiseeCustomerPaymentTermsEdit({orgOwner: this.setAccountBtnRow.orgOwner,paymentTerms: this.setAccountVal})this.$message.success('操作成功')this.deltaskList(index)this.querySubmit(1)},// 取消deltaskList (index) {this.$refs[`popover-${index}`].doClose()}

http://www.lryc.cn/news/272799.html

相关文章:

  • c++类全面讲解
  • 使用Python和Pygame库创建简单的的彩球效果
  • 第2课 使用FFmpeg读取rtmp流并用openCV显示视频
  • 【中小型企业网络实战案例 七】配置限速
  • Hive实战:实现数据去重
  • 客户满意度调查常用的ChatGPT通用提示词模板
  • Android--Jetpack--Paging详解
  • Unity 基于UDP实现本地时间与网络时间校验 防客户端修改日期作弊
  • ArduPilot开源代码之MatekSys Optical Flow 3901-L0X
  • 【时钟】分布式时钟HLC|Logical Time|Vector Clock|True Time
  • 人工智能AI与3D视觉技术的结合正在引领新一代移动机器人的革新
  • NSSCTF 简单包含
  • FlinkSQL处理Canal-JSON数据
  • 玩转贝启科技BQ3588C开源鸿蒙系统开发板 —— DevEco Studio下载与安装
  • 大模型上下文长度的超强扩展:从LongLora到LongQLora
  • pdf格式转换为txt格式
  • scss使用for循环遍历,动态赋值类名并配置不同颜色
  • GaussDB数据库使用COPY命令导数
  • SunFMEA软件免费试用:FMEA的目标和限制是什么?
  • 【Redis交响乐】Redis中的数据类型/内部编码/单线程模型
  • APK 瘦身
  • GitHub上的15000个Go模块存储库易受劫持攻击
  • 避免3ds Max效果图渲染一片黑的4个正确解决方法
  • UI演示双视图立体匹配与重建
  • 添加一个编辑的小功能(PHP的Laravel)
  • YOLOv8改进 | 主干篇 | ConvNeXtV2全卷积掩码自编码器网络
  • elasticsearch7.17.9两节点集群改为单节点
  • 二叉树的层序遍历,力扣
  • 构建Dockerfile报错/bin/sh: 1: cd: can‘t cd to /xxx/yyy问题记录
  • Vue常用的修饰符详解(有哪些,怎么用)