mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
29 lines
626 B
TypeScript
29 lines
626 B
TypeScript
export type ToastOptions = {
|
|
type?: string;
|
|
mask?: boolean;
|
|
message?: string;
|
|
position?: string;
|
|
duration?: number;
|
|
forbidClick?: boolean;
|
|
}
|
|
|
|
export interface Toast {
|
|
(message: ToastOptions | string, options?: ToastOptions): void;
|
|
loading(options?: ToastOptions): void;
|
|
success(options?: ToastOptions): void;
|
|
fail(options?: ToastOptions): void;
|
|
clear(): void;
|
|
install(): void;
|
|
setDefaultOptions(options: ToastOptions): void;
|
|
resetDefaultOptions(): void;
|
|
allowMultiple(allow: boolean): void
|
|
}
|
|
|
|
declare module 'vue/types/vue' {
|
|
interface Vue {
|
|
$toast: Toast
|
|
}
|
|
}
|
|
|
|
export const Toast: Toast;
|