import type { AppContext, VNode, ExtractPropTypes } from 'vue'; export type Action = 'confirm' | 'close' | 'cancel' | ''; export type MessageBoxType = '' | 'prompt' | 'alert' | 'confirm'; export type ModalBoxData = MessageBoxInputData & Action; export interface MessageBoxInputData { value: string; action: Action; } export interface MessageBoxInputValidator { (value: string): boolean | string; } export type Callback = (action: Action) => Promise; export declare const optionsProps: { autofocus: { type: BooleanConstructor; default: boolean; }; title: { type: StringConstructor; default: string; }; /** * 标题描述 */ description: { type: StringConstructor; default: string; }; /** * 侧边栏描述 */ asideDescription: { type: StringConstructor; default: string; }; /** * 禁用确认操作 */ confirmDisabled: { type: BooleanConstructor; default: boolean; }; cancelDisabled: { type: BooleanConstructor; default: boolean; }; useMaximizing: { type: BooleanConstructor; default: boolean; }; maximizing: { type: BooleanConstructor; default: boolean; }; width: { type: NumberConstructor; default: number; }; height: { type: NumberConstructor; default: number; }; mask: { type: BooleanConstructor; default: boolean; }; maskClosable: { type: BooleanConstructor; default: boolean; }; destroyOnClose: { type: BooleanConstructor; default: boolean; }; okText: { type: StringConstructor; default: string; }; cancelText: { type: StringConstructor; default: string; }; header: { type: BooleanConstructor; default: boolean; }; showClose: { type: BooleanConstructor; default: boolean; }; footer: { type: BooleanConstructor; default: boolean; }; bottomLine: { type: BooleanConstructor; default: boolean; }; disabled: { type: BooleanConstructor; default: boolean; }; immediately: { type: BooleanConstructor; default: boolean; }; active: { type: BooleanConstructor; default: boolean; }; zIndex: { type: import("vue").PropType; }; }; export type ModalBoxOptions = ExtractPropTypes; export interface ModalPayLoad { options: Partial; mainSlot: VNode | String; asideSlot?: VNode | String; footerSlot?: VNode; callback?: Callback; validate?: () => Boolean; confirm?: () => Promise; } export type ModalBoxShortcutMethod = ((payLoad: ModalPayLoad, appContext?: AppContext | null) => Promise) & ((payLoad: ModalPayLoad, appContext?: AppContext | null) => Promise); export interface IModalBox { _context: AppContext | null; /** Show a message box */ /** Show a message box */ (payLoad: ModalPayLoad, appContext?: AppContext | null): Promise; /** Close current message box */ close(): void; }