UNPKG

ipink-util

Version:

util.js

21 lines (20 loc) 839 B
import ShowModalOptions = UniNamespace.ShowModalOptions; export declare const htmlToast: (content: string, duration?: number, complete?: Function, mask?: boolean, success?: Function, fail?: Function) => void; export interface IToast { /** @desc 标题 **/ title?: string; /** @desc 图标 **/ icon?: "success" | "error" | "fail" | "exception" | "loading" | "none"; /** @desc 是否允许穿透 **/ mask?: boolean; /** @desc 持续时间 **/ duration?: number; /** @desc 无论成功还是失败回调 **/ complete?: Function; /** @desc 成功回调 **/ success?: Function; /** @desc 失败回调 **/ fail?: Function; } export declare const toast: (options: IToast | string) => void | ""; export declare const showModal: (options: ShowModalOptions) => Promise<boolean>;