UNPKG

@cblink/finches-ui

Version:

A Component Library for Vue 3

23 lines (22 loc) 848 B
import { Slots } from 'vue'; interface TreeHelperConfig { id: string; children: string; pid: string; } export declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void; /** * @description: Get slot to prevent empty error */ export declare function getSlot(slots: Slots, slot?: string, data?: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }>[] | null; /** * extends slots * @param slots * @param excludeKeys */ export declare function extendSlots(slots: Slots, excludeKeys?: string[]): any; export declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[]; export declare function treeToList<T = any>(tree: any, config?: Partial<TreeHelperConfig>): T; export {};