|
|
@ -123,14 +123,16 @@ export default defineComponent({ |
|
|
|
const sortRef = ref() |
|
|
|
// 选中某行 |
|
|
|
const selectRow = (selection,row)=>{ |
|
|
|
console.log('selectRow',row) |
|
|
|
const selected = elTableRef.value?.getSelectionRows().some((item) => item.id === row.id) |
|
|
|
if(props.isCheckStrictly&&selected&&row.children){//取消关联 |
|
|
|
row.children.forEach(item => { |
|
|
|
elTableRef.value?.toggleRowSelection(item, false); |
|
|
|
}); |
|
|
|
} |
|
|
|
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows()) |
|
|
|
nextTick(()=>{ |
|
|
|
const selected = elTableRef.value?.getSelectionRows().some((item) => item.id === row.id) |
|
|
|
|
|
|
|
if(props.isCheckStrictly&&selected&&row.children){//取消关联 |
|
|
|
row.children.forEach(item => { |
|
|
|
elTableRef.value?.toggleRowSelection(item, false); |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
//全选回调 |
|
|
|
const selectAll = ()=>{ |
|
|
|