import { AllowedComponentProps, VNodeProps } from '../common' import { PopupProps, PopupEmits, PopupMethods } from './popup' import type { ButtonType, ButtonSize } from './button' // 模态框组件 Props declare interface ModalProps extends PopupProps { // 标题和内容 title?: string subtitle?: string content?: string // 头部配置 showHeader?: boolean showSubtitle?: boolean // 内容配置 bodyStyle?: Record // 底部按钮配置 showFooter?: boolean showCancel?: boolean showConfirm?: boolean cancelText?: string confirmText?: string cancelType?: ButtonType // 'default' | 'primary' | 'warning' | 'error' confirmType?:ButtonType// 'default' | 'primary' | 'warning' | 'error' cancelPlain?: boolean confirmPlain?: boolean cancelDisabled?: boolean confirmDisabled?: boolean cancelLoading?: boolean confirmLoading?: boolean buttonSize?: ButtonSize//'small' | 'medium' | 'large' // 弹窗配置 maxWidth?: string minWidth?: string // 行为控制 closeOnClickAction?: boolean showCloseAfterConfirm?: boolean showCloseAfterCancel?: boolean } // 模态框组件方法 declare interface ModalMethods extends PopupMethods { } declare interface ModalEmits extends PopupEmits { (e: 'confirm') (e: 'cancel') } declare interface _Modal { new(): { $props: AllowedComponentProps & VNodeProps & ModalProps $emit: ModalEmits } & ModalMethods } export declare const Modal: _Modal export default Modal export type { ModalProps, ModalEmits, ModalMethods }