import { ButtonProps, ClassValue, StyleValue } from '@wakeadmin/element-adapter'; import { Ref } from '@wakeadmin/demi'; import { FatFormBaseProps, FatFormEvents, FatFormMethods, FatFormSlots } from '../fat-form'; import { OurComponentInstance } from '../utils'; export type FatFormPageMethods = Partial>; export interface FatFormPageSlots extends Omit, 'renderSubmitter'> { renderTitle?: (form?: FatFormPageMethods) => any; renderExtra?: (form?: FatFormPageMethods) => any; renderDefault?: () => any; renderSubmitter?: (form?: FatFormPageMethods) => any; } export interface FatFormPageEvents extends FatFormEvents { /** * 已取消 */ onCancel?: () => void; } export declare function useFatFormPageRef(): Ref> | undefined>; export interface FatFormPageProps extends FatFormBaseProps, FatFormPageSlots, FatFormPageEvents { /** * 页面布局 */ pageLayout?: FatFormPageLayout; /** * 布局自定义参数 */ pageLayoutProps?: any; /** * 页面标题 */ title?: string; /** * 是否开启取消按钮, 默认开启 */ enableCancel?: boolean; /** * 取消按钮文本, 默认为取消 */ cancelText?: string; /** * 自定义取消 props */ cancelProps?: ButtonProps; /** * 点击取消前调用,默认行为是返回上一页。调用 done 可以执行默认行为 */ beforeCancel?: (done: () => void) => void; } export declare const FatFormPagePublicMethodKeys: ("error" | "values" | "disabled" | "size" | "mode" | "validate" | "clearable" | "loading" | "layout" | "reset" | "submit" | "request" | "labelWidth" | "labelSuffix" | "submitting" | "formRef" | "getValuesToSubmit" | "validateField" | "isFieldTouched" | "clearValidate" | "getFieldValue" | "setFieldValue" | "unsetFieldValue" | "renderButtons")[]; export type FatFormPageLayout = (renders: { class?: ClassValue; style?: StyleValue; /** * 子级中是否包含了 FatFormSection */ includeSections?: boolean; /** * 表单实例引用 */ form?: Ref | undefined>; /** * 渲染标题 */ renderTitle: () => any; /** * 渲染额外内容 */ renderExtra: () => any; /** * 渲染表单主体 */ renderForm: () => any; /** * 渲染提交按钮, 禁用时为空 */ renderSubmitter?: () => any; /** * 布局自定义参数 */ layoutProps: any; }) => any; declare const DefaultLayout: FatFormPageLayout; export { DefaultLayout as FAT_FORM_PAGE_DEFAULT_LAYOUT }; export declare const FatFormPage: new (props: FatFormPageProps) => OurComponentInstance, FatFormPageSlots, FatFormPageEvents, Partial>>; //# sourceMappingURL=fat-form-page.d.ts.map