@cn-ui/core
Version:
The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.
16 lines (15 loc) • 672 B
TypeScript
import { type Component, type JSXElement } from "solid-js";
interface LazyLoadProps<T extends Record<string, Component | any>> extends IntersectionObserverInit {
/** 未进入 loading 态时的操作 */
children?: JSXElement;
load: () => Promise<T>;
loadKey?: keyof T;
/** 加载态 */
loading?: Component;
error?: Component;
/** 是否只在第一次进行加载 */
loadOnce?: boolean;
debounceTime?: number;
}
export declare const LazyLoad: <T extends Record<string, Component | any>>(props: import("@cn-ui/reactive").OriginComponentOutputType<LazyLoadProps<T>, HTMLElement, string>) => import("solid-js").JSX.Element;
export {};