Browse Source

解决渲染回调延时

linshi20240813
wangyufei 3 months ago
parent
commit
2a91774e6f
  1. 16
      src/components/Table/src/Table.vue

16
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 = ()=>{

Loading…
Cancel
Save