import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; import type { CSSProperties, ComputedRef, PropType, VNodeChild } from 'vue'; export declare type VueNode = VNodeChild | JSX.Element; export declare const modalProps: { visible: { type: BooleanConstructor; }; scrollTop: { type: BooleanConstructor; default: boolean; }; height: { type: NumberConstructor; }; minHeight: { type: NumberConstructor; }; draggable: { type: BooleanConstructor; default: boolean; }; centered: { type: BooleanConstructor; }; cancelText: { type: StringConstructor; }; okText: { type: StringConstructor; }; closeFunc: PropType<() => Promise>; }; export declare const basicProps: { visible: { type: BooleanConstructor; }; scrollTop: { type: BooleanConstructor; default: boolean; }; height: { type: NumberConstructor; }; minHeight: { type: NumberConstructor; }; draggable: { type: BooleanConstructor; default: boolean; }; centered: { type: BooleanConstructor; }; cancelText: { type: StringConstructor; }; okText: { type: StringConstructor; }; closeFunc: PropType<() => Promise>; } & { defaultFullscreen: { type: BooleanConstructor; }; canFullscreen: { type: BooleanConstructor; default: boolean; }; wrapperFooterOffset: { type: NumberConstructor; default: number; }; helpMessage: PropType; useWrapper: { type: BooleanConstructor; default: boolean; }; loading: { type: BooleanConstructor; }; loadingTip: { type: StringConstructor; }; /** * @description: Show close button */ showCancelBtn: { type: BooleanConstructor; default: boolean; }; /** * @description: Show confirmation button */ showOkBtn: { type: BooleanConstructor; default: boolean; }; wrapperProps: PropType>; afterClose: PropType<() => Promise>; bodyStyle: PropType; style: PropType; closable: { type: BooleanConstructor; default: boolean; }; closeIcon: PropType; confirmLoading: { type: BooleanConstructor; }; destroyOnClose: { type: BooleanConstructor; }; footer: PropType; getContainer: PropType<() => any>; mask: { type: BooleanConstructor; default: boolean; }; maskClosable: { type: BooleanConstructor; default: boolean; }; keyboard: { type: BooleanConstructor; default: boolean; }; maskStyle: PropType; okType: { type: StringConstructor; default: string; }; okButtonProps: PropType void) | undefined; onMousedown?: ((event: MouseEvent) => void) | undefined; }>>; cancelButtonProps: PropType void) | undefined; onMousedown?: ((event: MouseEvent) => void) | undefined; }>>; title: { type: StringConstructor; }; visible: { type: BooleanConstructor; }; width: PropType; wrapClassName: { type: StringConstructor; }; zIndex: { type: NumberConstructor; }; }; /** * @description: 弹窗对外暴露的方法 */ export interface ModalMethods { redoThumbHeight: () => void; setModalProps: (props: Partial) => void; emitVisible?: (visible: boolean, uid: number) => void; redoModalHeight?: () => void; } declare type RegisterFn = (modalMethods: ModalMethods, uuid?: string) => void; export interface ModalReturnMethods extends ModalMethods { openModal: (props?: boolean, data?: T, openOnSet?: boolean) => void; closeModal: () => void; getVisible?: ComputedRef; } export declare type UseModalReturnType = [RegisterFn, ModalReturnMethods]; export interface ReturnInnerMethods extends ModalMethods { closeModal: () => void; changeLoading: (loading: boolean) => void; changeOkLoading: (loading: boolean) => void; getVisible?: ComputedRef; redoModalHeight: () => void; } export declare type UseModalInnerReturnType = [RegisterFn, ReturnInnerMethods]; export interface ModalProps { minHeight?: number; height?: number; wrapperFooterOffset?: number; draggable?: boolean; scrollTop?: boolean; canFullscreen?: boolean; defaultFullscreen?: boolean; visible?: boolean; helpMessage: string | string[]; useWrapper: boolean; loading: boolean; loadingTip?: string; wrapperProps: Omit; showOkBtn: boolean; showCancelBtn: boolean; closeFunc: () => Promise; /** * Specify a function that will be called when modal is closed completely. * @type Function */ afterClose?: () => any; /** * Body style for modal body element. Such as height, padding etc. * @default {} * @type object */ bodyStyle?: CSSProperties; style?: CSSProperties; /** * Text of the Cancel button * @default 'cancel' * @type string */ cancelText?: string; /** * Centered Modal * @default false * @type boolean */ centered?: boolean; /** * Whether a close (x) button is visible on top right of the modal dialog or not * @default true * @type boolean */ closable?: boolean; /** * Whether a close (x) button is visible on top right of the modal dialog or not */ closeIcon?: VNodeChild | JSX.Element; /** * Whether to apply loading visual effect for OK button or not * @default false * @type boolean */ confirmLoading?: boolean; /** * Whether to unmount child components on onClose * @default false * @type boolean */ destroyOnClose?: boolean; /** * Footer content, set as :footer="null" when you don't need default buttons * @default OK and Cancel buttons * @type any (string | slot) */ footer?: VNodeChild | JSX.Element; /** * Return the mount node for Modal * @default () => document.body * @type Function */ getContainer?: (instance: any) => HTMLElement; /** * Whether show mask or not. * @default true * @type boolean */ mask?: boolean; /** * Whether to close the modal dialog when the mask (area outside the modal) is clicked * @default true * @type boolean */ maskClosable?: boolean; /** * Style for modal's mask element. * @default {} * @type object */ maskStyle?: CSSProperties; /** * Text of the OK button * @default 'OK' * @type string */ okText?: string; /** * Button type of the OK button * @default 'primary' * @type string */ okType?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default'; /** * The ok button props, follow jsx rules * @type object */ okButtonProps?: ButtonProps; /** * The cancel button props, follow jsx rules * @type object */ cancelButtonProps?: ButtonProps; /** * The modal dialog's title * @type any (string | slot) */ title?: VNodeChild | JSX.Element; /** * Width of the modal dialog * @default 520 * @type string | number */ width?: string | number; /** * The class name of the container of the modal dialog * @type string */ wrapClassName?: string; /** * The z-index of the Modal * @default 1000 * @type number */ zIndex?: number; } export interface ModalWrapperProps { footerOffset?: number; loading: boolean; modalHeaderHeight: number; modalFooterHeight: number; minHeight: number; height: number; visible: boolean; fullScreen: boolean; useWrapper: boolean; } export declare type Recordable = Record; export declare type Record = { [P in K]: T; }; export interface ComponentElRef { $el: T; } export declare type ComponentRef = ComponentElRef | null; export interface Fn { (...arg: T[]): R; } export declare type Nullable = T | null; export declare type ElRef = Nullable; export {};