File tree 2 files changed +2
-10
lines changed
components/vc-virtual-list
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 1
1
import type { FunctionalComponent , PropType } from 'vue' ;
2
2
import { cloneVNode } from 'vue' ;
3
+ import { flattenChildren } from '../_util/props-util' ;
3
4
4
5
export interface ItemProps {
5
6
setRef : ( element : HTMLElement ) => void ;
6
7
}
7
8
8
9
const Item : FunctionalComponent < ItemProps > = ( { setRef } , { slots } ) => {
9
- const children = slots . default ?.( ) ;
10
+ const children = flattenChildren ( slots . default ?.( ) ) ;
10
11
11
12
return children && children . length
12
13
? cloneVNode ( children [ 0 ] , {
Original file line number Diff line number Diff line change @@ -224,15 +224,6 @@ const List = defineComponent({
224
224
if ( ! useVirtual . value || ! inVirtual . value ) {
225
225
return ;
226
226
}
227
- if ( ! inVirtual . value ) {
228
- Object . assign ( calRes , {
229
- scrollHeight : offsetHeight . value ,
230
- start : 0 ,
231
- end : mergedData . value . length - 1 ,
232
- offset : undefined ,
233
- } ) ;
234
- return ;
235
- }
236
227
237
228
let itemTop = 0 ;
238
229
let startIndex : number | undefined ;
You can’t perform that action at this time.
0 commit comments