一个思路,你得使用Element中el-table组件的作用域插槽功能, <el-table-column label="Operations"> <template #default="scope"> <el-button size="small" @click="handleEdit(scope.$index, scope.row)" >Edit</el-button > <el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)" >Delete</el-button > </template> </el-table-column>scope中拿到一排的数据然后计算一下
一个思路,你得使用Element中el-table组件的作用域插槽功能,
scope中拿到一排的数据然后计算一下