在表格中嵌套<template slot-scope="scope">
,可以获得该表格中每当前行的各种属性
<template slot-scope="scope">
<el-button
@click.native.prevent="addRow(scope.$index, tableData)"
type="text"
size="small"
>增加</el-button>
</template>
//获取当前行的下标scope.$index,如果你的行中有属性date或者name,
//那么可以直接使用scope.$date或者scope.$name
//scope只是个名字,你可以自己随意改