<el-table
ref="companyTable"
width="100%"
border
:data="selections"
:span-method="arraySpanMethod"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
:reserve-selection="true"
:selectable="setCheckboxStatus"/>
<el-table-column label="单位名称" prop="unitName" align="center" />
<el-table-column label="行业名称" prop="name" align="center">
</el-table-column>
</el-table>
arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (columnIndex === 0 && rowIndex === 0) {
return {
rowspan: this.selections.length,
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
}
},