Browse Source

解决渲染回调延时

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

6
src/components/Table/src/Table.vue

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

Loading…
Cancel
Save