showToast 显示Toast
showToast ^6.8
显示 Toast
#请求参数
| Prop | Type | Comment |
|---|---|---|
title |
String |
提示的内容 |
duration |
Number |
提示的延迟时间 |
bgStyle |
String |
("black / white")样式black:(黑底白字,默认值),white:(白底黑字) |
| #### 参数代码示例 |
const title = "toast测试", duration = 3000, bgStyle = "black";
#接口调用示例
const title = "toast测试", duration = 3000, bgStyle = "black";
this.$bridge
.showToast(title, duration)
.then(res => {
// this.$toast(res)
})
.catch(err => {
// this.$toast(err)
})
#返回参数
- 成功时返回N/A
#返回示例
{
"title": "toast测试",
"duration": 3000
}
浙公网安备 33010602011771号