core
    正在准备搜索索引...

    接口 ShowToastData

    吐司提示

    interface ShowToastData {
        duration?: number;
        icon?: "success" | "loading" | "error" | "none" | "fail" | "exception";
        image?: string;
        mask?: boolean;
        position?: "top" | "center" | "bottom";
        title: string;
    }
    索引

    属性

    duration?: number

    提示的延迟时间,单位毫秒,默认:1500

    icon?: "success" | "loading" | "error" | "none" | "fail" | "exception"

    图标

    • success: 显示成功图标
    • loading: 显示加载图标
    • error: 显示错误图标
    • none: 不显示图标
    • fail: 显示错误图标,此时 title 文本无长度显示,仅支付宝小程序、字节小程序
    • exception: 显示异常图标。此时 title 文本无长度显示,仅支付宝小程序
    image?: string

    自定义图标的本地路径,image 的优先级高于 icon

    mask?: boolean

    是否显示透明蒙层,防止触摸穿透,默认:false

    position?: "top" | "center" | "bottom"

    纯文本轻提示显示位置,填写有效值后只有 title 属性生效

    • top: 居上显示
    • center: 居中显示
    • bottom: 居底显示
    title: string

    提示的内容