UNPKG

press-ui

Version:

简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目

47 lines (35 loc) 1.14 kB
type IOptions = Partial<{ context: any; selector: string | ((context: any) => any); show: boolean; mask: boolean; message: string; forbidClick: boolean; zIndex: number; type: string; loadingType: string; loadingSize: string; loadingColor: string; position: string; duration: number; animationDuration: number; onClose: Function | null; }>; interface IToast { (options: IOptions | string): IToast; loading: (options: IOptions | string) => IToast; success: (options: IOptions | string) => IToast; fail: (options: IOptions | string) => IToast; clear: (all?: boolean) => IToast; setDefaultOptions: (options: IOptions) => void; resetDefaultOptions: () => void; } declare const Toast: IToast; export default Toast; export const showToast: typeof Toast; export const showFailToast: typeof Toast.fail; export const showSuccessToast: typeof Toast.success; export const showLoadingToast: typeof Toast.loading; export const closeToast: typeof Toast.clear; export const setToastDefaultOptions: typeof Toast.setDefaultOptions; export const resetToastDefaultOptions: typeof Toast.resetDefaultOptions;