官方给的例子里没有对应的方法名,只有点击确定的属性yes。
测试了pc端的cancel,不好使。
最后发现取消的属性是end。
layer.open({
content: '这是提示框内容'
,btn: ['ok', 'cancel']
,yes: function(index, layero){
console.log("ok");
}
,end: function(index, layero){
console.log("cancel");
}
});而且这个手机版的最多只能有两个按钮。