mui消息弹框
最近在写前端h5+,发现一个Hbuilder,HbuilderX是个很好用的软件,里面已经包含了mui插件。下面我简单介绍一下mui四种消息框的用法。
- alert(警告框)
mui.alert( message, title, btnValue, callback [, type] )message Type/value 备注 message Type: String 提示对话框上显示的内容 title Type: String 提示对话框上显示的标题 btnValue Type: String 提示对话框上按钮显示的内容 callback Type: String 提示对话框上关闭后的回调函数 type Value: ‘div’ 是否使用h5绘制的对话框
mui.alert('欢迎使用Hello MUI', 'Hello MUI', function() {
info.innerText = '警告框';
});
- confirm(确认框)
mui.confirm( message, title, btnValue, callback [, type] )
var btnArray = ['否', '是']