import React, { FC } from 'react'; import { ModalFuncProps } from 'antd/es/modal'; import { ButtonProps } from 'antd'; interface BaseMethodProps extends ModalFuncProps { /** Modal 完全关闭后的回调 */ afterClose?: () => void; /** 指定自动获得焦点的按钮 */ autoFocusButton?: null | 'ok' | 'cancel'; /** Modal body 样式 */ bodyStyle?: React.CSSProperties; /** cancel 按钮 props */ cancelButtonProps?: ButtonProps; /** 设置 Modal.confirm 取消按钮文字 */ cancelText?: string; /** 垂直居中展示 Modal */ centered?: boolean; /** 容器类名 */ className?: string; /** 是否显示右上角的关闭按钮 */ closable?: boolean; /** 自定义关闭图标 */ closeIcon?: React.ReactNode; /** 内容 */ content?: React.ReactNode; /** 指定 Modal 挂载的 HTML 节点, false 为挂载在当前 dom */ getContainer?: string | false | HTMLElement | (() => HTMLElement); /** 自定义图标 */ icon?: React.ReactNode; /** 是否支持键盘 esc 关闭 */ keyboard?: boolean; /** 是否展示遮罩 */ mask?: boolean; /** 点击蒙层是否允许关闭 */ maskClosable?: boolean; /** 遮罩样式 */ maskStyle?: React.CSSProperties; /** ok 按钮 props */ okButtonProps?: ButtonProps; /** 确认按钮文字 */ okText?: string; /** 确认按钮类型 */ okType?: "default" | "primary" | "ghost" | "dashed" | "link" | "text" | 'danger'; /** 可用于设置浮层的样式,调整浮层位置等 */ style?: React.CSSProperties; /** 标题 */ title?: React.ReactNode; /** 宽度 */ width?: string | number; /** 对话框外层容器的类名 */ wrapClassName?: string; /** 设置 Modal 的 z-index */ zIndex?: number; /** 取消回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 */ onCancel?: (e: React.MouseEvent) => void; /** 点击确定回调,参数为关闭函数,返回 promise 时 resolve 后自动关闭 */ onOk?: (e: React.MouseEvent) => void; } export type FRCMethodProps = BaseMethodProps; export declare const Confirm: FC; export default Confirm;