import { Ref } from '@wakeadmin/demi'; import { ButtonProps, DialogProps } from '@wakeadmin/element-adapter'; import { OurComponentInstance } from '../utils'; import { FatTableEvents, FatTableMethods, FatTableProps, FatTableSlots } from '../fat-table/types'; export interface FatTableModalMethods extends FatTableMethods { /** * 显示弹窗 * * 如果传入 `props` 那么会优先使用该`props`进行渲染 * @param props */ open: (props?: Partial>) => void; /** * 确认 * @returns */ confirm: () => void; /** * 关闭 * @returns */ close: () => void; /** * 是否处于开启状态 */ isOpen: () => boolean; /** * 是否处于关闭状态 */ isClose: () => boolean; /** * 默认按钮渲染 * @returns */ renderButtons: () => any; } export declare const FatTableModalPublicMethodKeys: (keyof FatTableModalMethods)[]; export interface FatTableModalSlots extends Omit, 'renderTitle'> { renderTitle?: (tableModalRef: FatTableModalMethods) => any; renderFooter?: (tableModalRef: FatTableModalMethods) => any; } export interface FatTableModalEvents { onOpen?: () => void; onOpened?: () => void; onClose?: () => void; onClosed?: () => void; } export interface FatTableModalProps extends Omit, 'width' | keyof FatTableSlots | keyof FatTableMethods | keyof FatTableEvents>, FatTableModalSlots, Omit { /** * 标题 * * 优先程度低于`renderTitle` */ title?: any; /** * 受控显示 */ visible?: boolean; /** * 是否开启取消按钮, 默认开启 */ enableCancel?: boolean; /** * 取消按钮文本, 默认为取消 */ cancelText?: string; /** * 自定义取消按钮 props */ cancelProps?: ButtonProps; /** * 是否开启确认按钮, 默认关闭 */ enableConfirm?: boolean; /** * 确认按钮文本, 默认为确认 */ confirmText?: string; /** * 自定义确认按钮 props */ confirmProps?: ButtonProps; /** * 关闭弹窗前调用,默认行为是关闭弹窗。调用 done 可以执行默认行为 */ beforeCancel?: (done: () => void) => void; /** * 关闭弹窗前调用,默认行为是关闭弹窗。调用 done 可以执行默认行为 */ beforeConfirm?: (done: () => void) => void; } export interface FatTableModalGlobalConfigurations { /** * 是否开启取消按钮, 默认开启 */ enableCancel?: boolean; /** * 取消按钮文本, 默认为取消 */ cancelText?: string; /** * 自定义取消按钮 props */ cancelProps?: ButtonProps; /** * 是否开启确认按钮, 默认关闭 */ enableConfirm?: boolean; /** * 确认按钮文本, 默认为确认 */ confirmText?: string; /** * 自定义确认按钮 props */ confirmProps?: ButtonProps; } export declare function useFatTableModalRef(): Ref | undefined>; export declare const FatTableModal: new (props: FatTableModalProps) => OurComponentInstance, FatTableModalSlots, FatTableModalEvents, FatTableModalMethods>; //# sourceMappingURL=fat-table-modal.d.ts.map