0


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

问题描述

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

解决办法

<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>
//点击行选择的时候获取三个参数  找到对应的标签
RowTableCollect(val, c, e){if(e.target.tagName =='INPUT')return
      this.CollectFactor = val
    },

本文转载自: https://blog.csdn.net/weixin_45859470/article/details/135473833
版权归原作者 Bubluu 所有, 如有侵权,请联系我们删除。

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

还没有评论