首页 > 其他 > 详细

选中分页中不同的行

时间:2020-05-06 16:30:17      阅读:70      评论:0      收藏:0      [点我收藏+]

html中

1.     :row-key="getRowKeys"

2.    :reserve-selection="true"

<el-table :data="tableData" border stripe v-loading="loading" :row-key="getRowKeys" @selection-change="handleSelectionChangeUser" class="first-tab mt-10">
<el-table-column type="selection" :reserve-selection="true" width="55" align="center"></el-table-column>
3.data中
data() {
return {
getRowKeys(row) {
return row.id
},
}
}
4. methods中
handleSelectionChangeUser(val) {
this.traineeData = val
}

选中分页中不同的行

原文:https://www.cnblogs.com/benbenbai/p/12836560.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!