diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue index b593ef265..4d9308544 100644 --- a/src/components/Table/src/Table.vue +++ b/src/components/Table/src/Table.vue @@ -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 = ()=>{