mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
26 lines
843 B
TypeScript
26 lines
843 B
TypeScript
declare type ToastMessage = string | number;
|
|
interface ToastOptions {
|
|
show?: boolean;
|
|
type?: string;
|
|
mask?: boolean;
|
|
zIndex?: number;
|
|
context?: any;
|
|
position?: string;
|
|
duration?: number;
|
|
selector?: string;
|
|
forbidClick?: boolean;
|
|
loadingType?: string;
|
|
message?: ToastMessage;
|
|
onClose?: () => void;
|
|
}
|
|
declare function Toast(toastOptions: ToastOptions | ToastMessage): Weapp.Component;
|
|
declare namespace Toast {
|
|
var loading: (options: string | number | ToastOptions) => Weapp.Component;
|
|
var success: (options: string | number | ToastOptions) => Weapp.Component;
|
|
var fail: (options: string | number | ToastOptions) => Weapp.Component;
|
|
var clear: () => void;
|
|
var setDefaultOptions: (options: ToastOptions) => void;
|
|
var resetDefaultOptions: () => void;
|
|
}
|
|
export default Toast;
|