Vue3 element-plus 获取当前行的索引值
这个是获取scope.row.ID数据体内部的id字段如果数据体内部没有就无法获取到
<template v-slot="scope">
<el-button @click="click_edit(scope.row.ID)" type="primary">编辑</el-button>
<el-button @click="click_del(sscope.row.ID)" type="danger">删除</el-button>
</template>
获取每行的渲染索引使用(scope.$index)
<template v-slot="scope">
<el-button @click="click_edit(scope.$index)" type="primary">编辑</el-button>
<el-button @click="click_del(scope.$index)" type="danger">删除</el-button>
</template>