如果你遇到了表格中按钮需要id的,就往下看吧

Element-ui 里面ID如何获取

<el-table-column
  label="操作">

  <template slot-scope="scope">
    <el-button type="primary" @click="Update(scope.row.id)" >修改</el-button>
    <el-button type="danger" @click="Del(scope.row.id)">删除</el-button>
  </template>
</el-table-column>

scope.row.id 获取本条数据的ID

scope.row 获取本条数据

 

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-04-16
猜你喜欢
  • 2021-07-29
  • 2021-10-16
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
相关资源
相似解决方案