首先在columns增加一列
columns: [{type: 'selection',width: 50,align: 'center'}
]
i-table提供了@on-selection-change 方法
<i-table :columns="columns2" :data="recipientData2" @on-selection-change="handleSelectRow(2)" ref='selection2'></i-table>
方法中获取dom元素拿到id
handleSelectRow(index) {let ids=[];this.$refs['selection'+index].getSelection().map(item=>{ids.push(item.id)})this.ids=ids},