Microseer.showActionSheet(object)

显示操作菜单ActionSheet

object 参数说明

参数名 类型 必填 说明
title string 否 标题
message string 否 消息内容
itemList string array 是 按钮的文字数组,数组长度最大为6个
success function 是 接口调用成功的回调函数
fail function 否 接口调用失败的回调函数
complete function 否 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调参数说明

属性名 类型 说明
tapIndex number 用户点击的按钮,从上到下的顺序,从0开始,-1 表示取消,

eg:


let callBack = {
    itemList: [
        '第一项', '第二项', '第三项', '第四项'
    ],
    success: function(res) {
        if (res.tapIndex == -1) {
            alert("点击取消");
        } else {
            alert("选中的值是:" + res.tapIndex);
        }
    }
};

Microseer.showActionSheet(callBack);

results matching ""

    No results matching ""