Appearance
类型: ShowToastOptions<>
属性
complete
• complete: undefined | (result: any) => void
接口调用结束的回调函数(调用成功、失败都会执行)。
duration
• duration: undefined | number
提示的延迟时间,单位毫秒,默认:2000。
fail
• fail: undefined | (result: any) => void
接口调用失败的回调函数。
icon
• icon: undefined | "success" | "loading" | "error" | "none"
图标。- success: 显示成功图标。- loading: 显示加载图标。- error: 显示错误图标。- none: 不显示图标。
image
• image: undefined | string
自定义图标的本地路径,image 的优先级高于 icon。
mask
• mask: undefined | boolean
是否显示透明蒙层,防止触摸穿透,默认:false。
position
• position: undefined | "top" | "center" | "bottom"
纯文本轻提示显示位置,填写有效值后只有 title 属性生效。- top: 居上显示。- center: 居中显示。- bottom: 居底显示。
success
• success: undefined | (result: any) => void
接口调用成功的回调函数。
title
• title: undefined | string
提示的内容。