如果你遇到了表格中按钮需要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 获取本条数据