Element UI 表格编辑停止冒泡

  • 功能:表格点击单元格出现input,点击空白关闭,单元格出现的点击事件加不了?
  • 在input外层加一个div,点击事件 @click.stop
<div
    v-if="scope.row.isSelected"
    class="tableCell"
    @click.stop
>
    <el-input
    ref="getInputFocus"
    v-model="scope.row.failureRate"
    oninput="value=value.replace(/^\.+|[^\d.]/g,'')"
    clearable
    ></el-input>
</div>
posted @ 2022-07-12 09:02  DL·Coder  阅读(363)  评论(0)    收藏  举报