vue
<el-table @row-click="clickRow" >
clickRow(val) {
this.$refs.table.toggleRowSelection(val);
}
this.$nextTick(function () {
this.trainPeopleTable.forEach(row=>{
if(this.selectList.indexOf(row.staffId) >= 0){
this.$refs.trainPersonTable.toggleRowSelection(row);
}
})
})
this.$set(this.jtcyData, index, Object.assign({}, row, {
"editing": false
}));
<el-table @row-click="clickRow" >
clickRow(val) {
this.$refs.table.toggleRowSelection(val);
}
this.$nextTick(function () {
this.trainPeopleTable.forEach(row=>{
if(this.selectList.indexOf(row.staffId) >= 0){
this.$refs.trainPersonTable.toggleRowSelection(row);
}
})
})
this.$set(this.jtcyData, index, Object.assign({}, row, {
"editing": false
}));
|