sard-uniapp
Version:
sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
35 lines (34 loc) • 1.11 kB
TypeScript
import { type ToastProps } from '../toast/common';
export interface ToastAgentProps extends ToastProps {
id?: string;
}
export declare const defaultToastAgentProps: () => {
id: string;
type: ToastProps["type"];
position: ToastProps["position"];
overlay: boolean;
timeout: number;
duration: number;
};
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 };