UNPKG

gtht-miniapp-sdk

Version:

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

38 lines (37 loc) 1.27 kB
import { type TransitionHookCallbacks } from '../popup/common'; import { type ToastEmits, type ToastProps } from '../toast/common'; export interface ToastAgentProps extends ToastProps, TransitionHookCallbacks { id?: string; } export declare const defaultToastAgentProps: () => { id: string; type: ToastProps["type"]; position: ToastProps["position"]; overlay: boolean; timeout: number; duration: number; }; export interface ToastAgentEmits extends ToastEmits { } export declare const imperativeName = "toast"; export interface ToastImperative { show(newProps: Record<string, any>): void; hide(): void; } export type ToastOptions = ToastAgentProps; export interface ToastSimpleShowFunction { (options: ToastOptions): void; (title?: string | number, options?: ToastOptions): void; } export interface ToastShowFunction { (optionsOrTitle?: string | number | ToastOptions, options?: ToastOptions, internalType?: ToastOptions['type']): void; } export type ToastFunction = ToastSimpleShowFunction & { success: ToastSimpleShowFunction; fail: ToastSimpleShowFunction; loading: ToastSimpleShowFunction; hide: (id?: string) => void; hideAll: () => void; }; declare const toast: ToastFunction; export { toast };