直接上代碼,就幾行,我以為需要自己寫,沒想到人家element-ui已經(jīng)給做好了!

image.png

image.png
<!-- :row-key="getRowKeys" -->
<el-table ref="multipleTable" :data="groupSearchList" tooltip-effect="dark" style="width: 100%" @selection-change="handleGroupSelectionChange" @row-click="handleClickRow" :row-key="getRowKeys">
<!-- :reserve-selection="true" -->
<el-table-column type="selection" width="55" :reserve-selection="true"/>
</el-table>
getRowKeys(row) {
// id根據(jù)后端數(shù)據(jù)修改
return row.id
},
遇到?jīng)]做過的,還是多百度吧,如果沒有在自己寫,實際開發(fā)如果是外包公司不會給你太多時間考慮東西。還是自營公司好,感謝公司收留。