UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

20 lines (19 loc) 579 B
import { Ref } from 'vue'; import { Props } from '../types'; /** * hook * * @param props 组件属性 * @param virtualListRef 实例 */ export declare const useVirtualList: (props: Props, virtualListRef: Ref<HTMLDivElement | null>) => { itemHeight: number; startIndex: Ref<number, number>; totalHeight: Ref<number, number>; heightStyle: import('vue').ComputedRef<string>; visibleItems: import('vue').ComputedRef<any[]>; onScroll: () => void; scrollToTop: () => void; scrollToBottom: () => void; scrollToIndex: (index: number) => void; };