方案如下:

<el-table-column prop="id" label="操作">
     <template slot-scope="scope">
         <i
              style="margin: 0 10px; cursor: pointer"
              @click="clickItemInfo(scope.$index, scope.row,scope.column,scope.row.id)"
              class="el-icon-search"
         ></i>
    </template>
</el-table-column>

解释:

<template>  中  @click  函数想要获得  <el-table-column  中的  prop  值。则可以在函数输入栏中输入  scope.row.id。前提是template 中 slot-scope="scope"

Logo

前往低代码交流专区

更多推荐