@chamn/engine
Version:
24 lines (23 loc) • 993 B
TypeScript
import { default as React } from 'react';
import { CMaterialPropsType } from '@chamn/model';
import { CForm } from './components/Form';
import { CPluginCtx } from '../../core/pluginManager';
import { CFormContextData } from './components/Form/context';
export type CustomSchemaFormInstance = CForm;
export type CustomSchemaFormProps = {
nodeId?: string;
pluginCtx?: CPluginCtx;
initialValue: Record<string, any>;
properties: CMaterialPropsType<any>;
onValueChange?: (val: any) => void;
onSetterChange: (keyPaths: string[], setterName: string) => void;
/** 存储每个字段上次使用的 setter */
defaultSetterConfig: Record<string, {
name: string;
setter: string;
}>;
customSetterMap?: CFormContextData['customSetterMap'];
};
export declare const CustomSchemaForm: React.ForwardRefExoticComponent<CustomSchemaFormProps & React.RefAttributes<CForm>>;
export * from './components/SetterSwitcher';
export * from './components/Setters';