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