<el-table
ref="multipleTable"
:data="DetailInfusionData"
border
:size="elTable"
@select="OnSelectRow"
>
<el-table-column
type="selection"
/>
js部分:
OnSelectRow(selection, row) {
// 有分组的,需要同一组一起选中和不选
this.$refs.multipleTable.toggleRowSelection(row)
this.DetailInfusionData.forEach(i => {
if (i.RecipeNo === row.RecipeNo) {
this.$refs.multipleTable.toggleRowSelection(i)
}
})
},