console
cola(function(model){
model.action({
info:function(){
cola.alert("Hello World !!", {
level: cola.MessageBox.level.INFO
})
},
warning:function(){
cola.alert("Hello World !!", {
level: cola.MessageBox.level.WARNING
})
},
error:function(){
cola.alert("Hello World !!", {
level: cola.MessageBox.level.ERROR
})
},
confirm:function(){
cola.confirm("Hello World !!",{
onApprove:function(){
console.log("yes")
},
onDeny:function(){
console.log("no")
}
})
}
})
});
<c-button caption="消息" click="info"></c-button>
<c-button caption="警告" click="warning"></c-button>
<c-button caption="错误" click="error"></c-button>
<c-button caption="确认框" click="confirm"></c-button>