element [Feature Request] table, row-key, Function(row) 内如何获得row在当前的data数组的index?

unguejic  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(37)

Existing Component

Component Name

table

Description

RT, $index

hlswsv35

hlswsv351#

Please provide minimum expected code

rsl1atfo

rsl1atfo2#

@webvs2

<el-table  row-key="rowKeyMethod"

methods: {
  rowKeyMethod: function(row) {
    console.log($index); // row在当前的data数组的index
    return uuid;
  }
}

相关问题