@alilc/lowcode-renderer-core
Version:
renderer core
33 lines (32 loc) • 1.08 kB
TypeScript
import { IPublicTypeEngineOptions } from '@alilc/lowcode-types';
import * as types from '../types/index';
export interface IComponentHocInfo {
schema: any;
baseRenderer: types.IBaseRendererInstance;
componentInfo: any;
scope: any;
}
export interface IComponentHocProps {
__tag: any;
componentId: any;
_leaf: any;
forwardedRef?: any;
}
export interface IComponentHocState {
childrenInState: boolean;
nodeChildren: any;
nodeCacheProps: any;
/** 控制是否显示隐藏 */
visible: boolean;
/** 控制是否渲染 */
condition: boolean;
nodeProps: any;
}
type DesignMode = Pick<IPublicTypeEngineOptions, 'designMode'>['designMode'];
export interface IComponentHoc {
designMode: DesignMode | DesignMode[];
hoc: IComponentConstruct;
}
export type IComponentConstruct = (Comp: types.IBaseRenderComponent, info: IComponentHocInfo) => types.IGeneralConstructor;
export declare function leafWrapper(Comp: types.IBaseRenderComponent, { schema, baseRenderer, componentInfo, scope, }: IComponentHocInfo): any;
export {};