项目中遇到,记录一下。
BootstrapDialog
初始化
BootstrapDialog.confirm({
title: '删除提示',//提示信息
message: '确定删除此条数据吗?',
type: BootstrapDialog.TYPE_INFO,//提示框颜色
closable: true,//点击对话框以外的页面内容可关闭
draggable: true,//可拖拽
btnCancelLabel: '取消',//按钮
btnOKLabel: '确定',
btnOKClass: 'btn-primary',确定按钮的样式
callback: function (result) {
if (result) {//点击取消,result值为false,点击确定,result值为true
//....do something
}
}
});