自定义按钮栏
$k.confirm({
content:'自定义按钮',
buttons:[
{text:'按钮一',onClick:function(args){
$k.alert({content:'onClick事件:您点击了“按钮一”'});
}},
{text:'按钮二',onClick:function(args){
$k.alert({content:'onClick事件:您点击了“按钮二”'});
},close:'first'}, //close:'first':先触发onClick事件,再触发onClosed事件.
{text:'按钮三',onClick:function(args){
$k.alert({content:'onClick事件:您点击了“按钮三”'});
}},
{text:'按钮四',onClick:function(args){
$k.alert({content:'onClick事件:您点击了“按钮四”'});
}}
],
onClosed:function(args){
if (args.closeTrigger == 'btn-0') {
$k.alert({content:'onClosed事件:您点击了“按钮一”'});
}
else if(args.closeTrigger == 'btn-1'){
$k.alert({content:'onClosed事件:您点击了“按钮二”'});
}
else if(args.closeTrigger == 'btn-2'){
$k.alert({content:'onClosed事件:您点击了“按钮三”'});
}
else if(args.closeTrigger == 'btn-3'){
$k.alert({content:'onClosed事件:您点击了“按钮四”'});
}
}
});