import { V3WaterfallInnerProperty, WaterfallList, HeightHook } from '../global.d'; import { Ref, useSlots } from 'vue'; type SlotsType = ReturnType; /** * @description: 进行分列布局计算 * @param {string} wrapperID 父元素绑定的id * @param {WeakMap} innerWeakMap 元素 -> 内部属性 映射 * @param {Map} colToListMap 列号 -> 元素列表 映射 * @param {Ref} topOfEveryColumn 每一列下个元素的 top 值 * @param {number | () => number} bottomGap 底部间隔(计算函数) * @param {number} width 元素宽度 * @param {number} gap 列的间隔 * @param {string} errorImgSrc 错误图片地址 * @param {SlotsType} slots slots句柄 * @param {HeightHook} heightHook 元素高度计算钩子 * @return {Layout} { wrapperHeight, layout } */ export default function useLayout(wrapperID: string, innerWeakMap: WeakMap, colToListMap: Map>, topOfEveryColumn: Ref, bottomGap: number | (() => number), width: Ref, gap: Ref, errorImgSrc: string, slots: SlotsType, heightHook: HeightHook): Layout; type Layout = { wrapperHeight: Ref; layout: (list: T[]) => void; insertItemsBefore: (list: T[], insertList: T[]) => void; }; export {};