UNPKG

gtht-miniapp-sdk

Version:

gtht-miniapp-sdk 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库

46 lines (45 loc) 1.34 kB
import { type StyleValue } from 'vue'; import { type ButtonProps } from '../button'; import { type TransitionHookEmits } from '../popup/common'; export type DialogBeforeClose = (type: 'close' | 'cancel' | 'confirm', loading: { readonly cancel: boolean; readonly confirm: boolean; readonly close: boolean; }) => any | Promise<any>; export interface DialogProps { rootStyle?: StyleValue; rootClass?: string; popupStyle?: StyleValue; popupClass?: string; visible?: boolean; title?: string; message?: string; headed?: boolean; buttonType?: 'round' | 'text'; showCancel?: boolean; cancelText?: string; showConfirm?: boolean; confirmText?: string; overlayClosable?: boolean; beforeClose?: DialogBeforeClose; duration?: number; cancelProps?: ButtonProps; confirmProps?: ButtonProps; } export declare const defaultDialogProps: { headed: boolean; buttonType: DialogProps["buttonType"]; showCancel: boolean; showConfirm: boolean; overlayClosable: boolean; duration: number; }; export interface DialogSlots { default?(props: Record<string, never>): any; } export interface DialogEmits extends TransitionHookEmits { (e: 'update:visible', visible: boolean): void; (e: 'close'): void; (e: 'cancel'): void; (e: 'confirm'): void; }