/** * @author Hanz * @date 2021/8/9 下午3:45 * @description popConfirm */ import React, { FC, ReactNode } from 'react'; import { ButtonProps } from '../Button'; import { TooltipProps } from '../Tooltip'; import './index.scss'; type ConfirmType = 'success' | 'info' | 'error' | 'warning'; export interface PopConfirmProps { /**触发方式*/ trigger?: 'click' | 'hover'; /** 是否显示弹框,controllable为true时可用 */ open?: boolean; /** 是否可控组件 */ controllable?: boolean; /**图标类型*/ type?: ConfirmType; /**标题*/ title?: ReactNode; /**内容*/ content?: ReactNode; /** 辅助说明 */ description?: ReactNode; /**自定义图标*/ icon?: ReactNode; /**ok 文本*/ okText?: string; /**cancel 文本*/ cancelText?: string; /** 确定回调*/ onOk?: Function; /** 取消回调*/ onCancel?: Function; /** 确定按钮属性*/ okButtonProps?: ButtonProps; /** 取消按钮属性*/ cancelButtonProps?: ButtonProps; /** 确认按钮展示高危样式,不再接受okButtonProps控制样式 */ okButtonDanger?: boolean; /** 确认按钮倒计时状态,倒计时进行时按钮为禁用,倒计时完成后解除禁用 */ countdown?: boolean; /** 倒计时时长(单位是s),countdown启用后生效,默认5s */ countdownTime?: number; /** 位置*/ placement?: TooltipProps['placement']; /** cls*/ className?: string; /** overlayClassName */ overlayClassName?: string; /** 自定义样式*/ style?: React.CSSProperties; /** 子节点*/ children?: ReactNode; /**显示取消按钮*/ showCancel?: boolean; /** 支持冒泡*/ bubble?: boolean; /**底部按钮*/ actions?: ReactNode; /** 关闭回调*/ onClose?: () => void; /** 倒计时完成回调 */ onCountdownFinish?: () => void; /** 浮层渲染容器,默认body */ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; [name: string]: any; } export declare const PopConfirm: FC; export default PopConfirm;