django-vue3-admin-web/node_modules/@fast-crud/ui-interface/dist/d/use/use-render.d.ts
2025-10-20 21:21:14 +08:00

20 lines
1.2 KiB
TypeScript

import type { BaseCI, CI, ComponentRenderBinding, UiSlotRet } from "../ui-interface";
export type UiSpecialBindingBuilder = () => Partial<ComponentRenderBinding>;
export type UiSpecialBinding = Partial<ComponentRenderBinding> | UiSpecialBindingBuilder;
export type UiRenderComponent = <T extends CI>(ci: T, opts: T["__options"]) => UiSlotRet;
export type UiDoRenderComponent = (binding: ComponentRenderBinding) => UiSlotRet;
export type UiRenderHelper = {
renderComponent: UiRenderComponent;
doRenderComponent: UiDoRenderComponent;
buildBinding: UiBuildBinding;
creator: UIComponentCreator;
};
export declare const doRenderComponent: UiDoRenderComponent;
export declare const renderComponent: UiRenderComponent;
export type UiBuildBinding = <T extends CI>(ci: UIBaseCI<T>, opts: T["__options"], special: UiSpecialBinding) => ComponentRenderBinding;
export declare const buildBinding: UiBuildBinding;
export type UIBaseCI<T> = Omit<T, keyof BaseCI> & Partial<Pick<T, keyof BaseCI>>;
export type UIComponentCreator = <T extends CI>(ci: UIBaseCI<T>, special?: UiSpecialBinding) => T;
export declare const creator: UIComponentCreator;
export declare function useUiRender(): UiRenderHelper;