el-table 个体行绑定点击事件时 表格中有el-radio和el-checkbox 点击触发两次事件处理方法

问题描述

在element的table中 使用radio或者checkbox 的单击事件,会导致radio或者checkbox的单击事件触发两次

解决办法

bash 复制代码
<el-table :data="tableData" style="width: 100%" max-height="500" :header-cell-style="tableHeaderCellStyle" :cell-style="RowStyle" @row-click="RowClockTable" border>
        <el-table-column width="80">
          <template slot-scope="scope">
            <el-radio v-model="RadioVlaue" :label="scope.row">{{ '' }}</el-radio>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="科室编号" width="180"> </el-table-column>
 </el-table>
bash 复制代码
//点击行选择的时候获取三个参数  找到对应的标签
RowTableCollect(val, c, e) {
      if (e.target.tagName == 'INPUT') return
      this.CollectFactor = val
    },
相关推荐
冰暮流星38 分钟前
javascript的switch语句介绍
java·前端·javascript
小简GoGo1 小时前
前端常用设计模式快速入门
javascript·设计模式
利刃大大1 小时前
【ES6】变量与常量 && 模板字符串 && 对象 && 解构赋值 && 箭头函数 && 数组 && 扩展运算符 && Promise/Await/Async
开发语言·前端·javascript·es6
天若有情6731 小时前
ES6 模块与 CommonJS 的区别详解
前端·javascript·es6
大猫会长1 小时前
postgreSQL中,RLS的using与with check
开发语言·前端·javascript
摘星编程2 小时前
React Native for OpenHarmony 实战:ProgressBar 进度条详解
javascript·react native·react.js
wusp19942 小时前
nuxt3模块化API架构
前端·javascript·nuxt3
摘星编程2 小时前
React Native for OpenHarmony 实战:SegmentControl 分段控件详解
javascript·react native·react.js
摘星编程2 小时前
React Native for OpenHarmony 实战:ProgressRing 环形进度详解
javascript·react native·react.js
TAEHENGV2 小时前
React Native for OpenHarmony 实战:数学练习实现
javascript·react native·react.js