///
import * as React from "react";
interface HTMLAttributesWeak extends React.HTMLAttributes {
title?: any;
}
export interface DialogProps extends HTMLAttributesWeak {
/**
* 样式类名的品牌前缀
*/
prefix?: string;
/**
* 自定义类名
*/
className?: string;
/**
* 自定义内联样式
*/
style?: React.CSSProperties;
/**
* 对话框的标题
*/
title?: any;
/**
* 传入底部的内容
*/
footer?: boolean | string | React.ReactNode;
/**
* 底部按钮的对齐方式
*/
footerAlign?: "left" | "center" | "right";
/**
* 控制对话框是否可见
*/
visible?: boolean;
/**
* 是否需要mask
*/
hasMask?: boolean;
/**
* 'esc, mask, close', 详见[closable](#closable)
*/
closable?: string | boolean;
/**
* 是否强制更新dialog的位置,在`isFullScreen`为true且align为`cc cc`的时候无效
*/
shouldUpdatePosition?: boolean;
/**
* 浮层自定义位置
*/
align?: string | number;
/**
* 配置动画的播放方式
*/
animation?: {} | boolean;
/**
* 在点击关闭按钮的时候触发的函数
*/
onClose?: () => void;
/**
* 浮层关闭后触发的事件, 如果有动画,则在动画结束后触发
*/
afterClose?: () => void;
/**
* 在点击Ok按钮的时候触发的函数
*/
onOk?: () => void;
/**
* 在点击Cancel按钮的时候触发的函数
*/
onCancel?: () => void;
/**
* 当dialog过高的时候距离viewport的最小边距,在`isFullScreen`下无效。
*/
minMargin?: number;
/**
* 当dialog弹出的时候是否自动获取焦点
*/
autoFocus?: boolean;
/**
* 自定义国际化文案对象
*/
locale?: {
ok: string;
cancel: string;
};
/**
* 自定义国际化语言
*/
language?: "en-us" | "zh-cn" | "zh-tw";
/**
* 是否是启用使用CSS定位模式的对话框, 在该模式下面无需通过`shouldUpdatePosition`来进行重新定位。
*/
isFullScreen?: boolean;
}
export default class Dialog extends React.Component {}