showToast 显示 Toast
showToast ^6.8
显示 Toast
#请求参数
| Prop | Type | Comment |
|---|---|---|
title |
String |
提示的内容 |
duration |
Number |
提示的延迟时间 |
bgStyle |
String |
black:黑底白字,默认值,white:白底黑字 |
#引入接口模块
import bridge from '@minix-iot/etsbridge-sdk'
#参数代码示例
let params = {
title: 'toast测试',
duration: 3000,
bgStyle: 'black',
}
#接口调用示例
bridge
.showToast(params)
.then((res) => {
console.log(res)
})
.catch((err) => {
console.log(err)
})
#返回参数
- 成功时返回 N/A
#返回示例
{
"title": "toast测试",
"duration": 3000
}
浙公网安备 33010602011771号