1.设置row-key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<el-table :border="true" :highlight-current-row="true" v-loading="loading" element-loading-text="数据加载中..." element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" ref="multipleTable" :data="partList" :row-key="getRowKey" tooltip-effect="dark" style="width: 100%" @select-all="handleSelectionAll" @selection-change="handleSelectionChange"> getRowKey (row) { return row.code }, |
2.设置选择行状态
:reserve-selection=“true”
1 |
<el-table-column align="center" :reserve-selection="true" type="selection" width="55"></el-table-column> |
from:https://blog.csdn.net/weixin_43153741/article/details/104842331