@iimm/formily-mui
Version:
form field components based on @mui/material and @formily/react
31 lines (30 loc) • 1.54 kB
TypeScript
import type { ComponentType, RefObject, ReactNode } from "react";
import { type IFormProps, type Form } from "@formily/core";
import { type StepperProps, type StepContentProps, type StepIconProps } from "@mui/material";
import { type StepFormProps } from "./StepForm";
import { type ResultRenderProps as StepsFormResultRenderProps } from "./DefaultCompleteRender";
interface StepsFormProps extends StepperProps, Omit<StepsFormResultRenderProps, "values" | "form" | "handleStepChange"> {
form?: Form;
direction?: "horizontal" | "vertical";
labelPlacement?: "horizontal" | "vertical";
onFinish?: ((values?: object, allValues?: object) => void | boolean) | ((values?: object, allValues?: object) => Promise<void | boolean>);
/** 传递给createForm的参数
* @default {validateFirst:true}
*/
createFormOptions?: IFormProps;
ResultRender?: ComponentType<StepsFormResultRenderProps>;
stepContentProps?: StepContentProps;
/** 重建form实例的depend项 */
depend?: any;
/** 获取form实例 */
formRef?: RefObject<Form>;
showReset?: boolean;
children?: ReactNode;
/** 保持子步骤表单项一直存在(只隐藏)? */
keepAlive?: boolean;
}
declare const StepsForm: {
(props: StepsFormProps): import("react/jsx-runtime").JSX.Element;
StepForm: import("react").MemoExoticComponent<import("@formily/react").ReactFC<Omit<StepFormProps, "ref">>>;
};
export { StepsForm, type StepsFormProps, type StepFormProps, type StepIconProps, type StepsFormResultRenderProps };