import * as React from "react"; import { ConfigConsumerProps } from "../Config"; export interface IDialogProps { /** * 取消按钮内容 * * @default '' **/ cancelButton?: React.ReactNode; /** * 包含的内容 * * @default '' **/ children?: React.ReactNode; /** * 包含底部内容 * * @default '' **/ footer?: React.ReactNode; /** * 自定义组件类名 * * @default '' **/ className?: string; /** * 是否开启遮罩层 * * @default true **/ hasMask?: boolean; /** * 打开时是否锁屏 * * @default true **/ lockScroll?: boolean; /** * 是否处于打开状态 * * @default false **/ isOpen?: boolean; /** * 是否允许点击遮罩层关闭弹框 * * @default false **/ outsideClose?: boolean; /** * 标题 * * @default '' **/ title?: string; /** * 是否有关闭按钮 * * @default true **/ hasClose?: boolean; /** * 关闭按钮内容 * * @default '' **/ closeButton?: React.ReactNode; /** * 点击关闭、取消按钮或遮罩层(outsideClose 为 true 时生效)时的回调 * * @default () =>{} **/ onClose?: () => void; /** * 点击确认按钮时的回调 * * @default () =>{} **/ onSubmit?: () => void; /** * 确认按钮内容 * * @default '' **/ submitButton?: React.ReactNode; /** * 组件宽度 * * @default '480' **/ width?: string; /** * 组件高度 * * @default undefined **/ height?: string; /** * 弹框类型 * * @default '' **/ type?: "info" | "success" | "wrong" | "warn" | ""; /** * 默认前缀 * * @default 'lg' **/ prefixCls?: string; /** * 自定义样式 * * @default **/ style?: React.CSSProperties; /** * 自定义外框样式 * * @default **/ wrapStyle?: React.CSSProperties; } interface IDialogPropsState { bodyOverflow: string | null; } declare class Dialog extends React.Component { static confirm: ({ actions, ...restProps }: IDialogProps & { actions?: { text?: string | undefined; onClick?: (() => void) | undefined; className?: string | undefined; styleType?: "" | "font" | "icon" | "primary" | "minor" | "ghost" | undefined; autoClose?: boolean | undefined; }[] | undefined; }) => { close: () => void; }; static defaultProps: { cancelButton: string; className: string; closeButton: string; hasMask: boolean; lockScroll: boolean; isOpen: boolean; onClose: () => null; onSubmit: () => null; outsideClose: boolean; submitButton: string; title: string; width: string; height: undefined; type: string; hasClose: boolean; style: {}; wrapStyle: {}; }; constructor(props: any); componentWillReceiveProps(nextProps: any): void; renderDialog: ({ getPrefixCls }: ConfigConsumerProps) => any; render(): JSX.Element; } export default Dialog;