###需要zepto或jquery
###用法
`
var confirm = new Alert(
$, //zepto or jquery
{
type: 'confirm', //type: confirm | continue | success | error
title: '提交确认', //title
message: '是否确认提交数据', //message
//buttons
button: [
{
label: '等一等', //label for button
classes: ['btn-normal', 'btn-wait'], //classes
key: 'click:wait', //key for button
action: { //action for key
wait: function(){
confirm.close()
//可以使用$(this)指代当前按钮
}
}
},
{
label: '提交',
classes: ['btn-important', 'btn-confirm-submit'],
key: 'click:submit',
attr: {
status: 1
},
action: {
submit: function(event){
console.log('do submit')
}
}
}
]
}
)
confirm.show()
`
###Method
`
Alert.show
显示弹层
Alert.close
关闭弹层
Alert.setTitle
动态设置标题(new之后可调用,重新设置标题)
Alert.setMessage
动态设置提示内容(new之后可调用,重新设置提示内容)
`