gtht-miniapp-sdk
Version:
gtht-miniapp-sdk 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
41 lines (40 loc) • 1.35 kB
TypeScript
import { type DialogEmits, type DialogProps } from '../dialog/common';
import { type TransitionHookCallbacks } from '../popup/common';
export interface DialogAgentProps extends DialogProps, TransitionHookCallbacks {
id?: string;
onClose?: () => void;
onCancel?: () => void;
onConfirm?: () => void;
}
export declare const defaultDialogAgentProps: () => {
id: string;
headed: boolean;
buttonType: DialogProps["buttonType"];
showCancel: boolean;
showConfirm: boolean;
overlayClosable: boolean;
duration: number;
};
export interface DialogAgentEmits extends DialogEmits {
}
export declare const imperativeName = "dialog";
export interface DialogImperative {
show(newProps: Record<string, any>): void;
hide(): void;
}
export type DialogOptions = DialogAgentProps;
export interface DialogSimpleShowFunction {
(options: DialogOptions): void;
(title: string, options?: DialogOptions): void;
}
export interface DialogShowFunction {
(optionsOrTitle: string | DialogOptions, options?: DialogOptions, internalOptions?: DialogOptions): void;
}
export type DialogFunction = DialogSimpleShowFunction & {
alert: DialogSimpleShowFunction;
confirm: DialogSimpleShowFunction;
hide: (id?: string) => void;
hideAll: () => void;
};
declare const dialog: DialogFunction;
export { dialog };