sard-uniapp
Version:
sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
34 lines (33 loc) • 1.26 kB
TypeScript
import { type DefaultProps } from '../config';
import { type TransitionHookCallbacks } from '../popup/common';
import { type ToastEmits, type ToastProps, type ToastSlots } from '../toast/common';
export interface ToastAgentProps extends ToastProps, TransitionHookCallbacks {
id?: string;
}
export declare const defaultToastAgentProps: () => DefaultProps<ToastAgentProps>;
export interface ToastAgentSlots extends ToastSlots {
}
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 };