-
Notifications
You must be signed in to change notification settings - Fork 0
API
yanjie108 edited this page Mar 26, 2019
·
32 revisions
在页面逻辑js中引入
let apiobj=this.getApi();
apiobj.showToast(text)
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| text | string | 是 | 提示的内容 |
apiobj.alert(msg,title,callback)
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| text | string | 是 | ||
| title | string | 否 | ||
| callback | function | 否 | 回调函数 |
apiobj.comfirm(msg,title,callback)
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| text | string | 是 | ||
| title | string | 否 | ||
| callback | function | 否 | 回调函数 |
apiobj.showLoading(loadingtext)
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| loadingtext | string | 否 |
apiobj.hideLoading() 关闭等待框
apiobj.showActionSheet(groups,title,callback)
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| groups | Array. | 是 | ||
| title | string | null | 否 | |
| groucallbackps | function | 是 |
举个栗子:
var buttons1 = [
{
text: '清仓'
},
{
text: '卖出',
color: '#FF0000'
},
{
text: '买入',
dataset:{"action":"buy"}
}
];
var buttons2 = [
{
text: '取消'
}
];
var groups = [buttons1, buttons2];
apiobj.showActionSheet(groups,"请您选择要执行的操作。",function(result){
console.log("actionsheet选择了>>>",JSON.stringify(result))
})
apiobj.showModal(html)
参数
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| html | string | 是 | 模态布局html |