消息框。
| Name | Parameter | Description | Return |
|---|---|---|---|
| mini.alert(message, title, callback) | 提示框 | messageId | |
| mini.confirm(message, title, callback) | 选择提示框 | messageId | |
| mini.prompt(message, title, callback, multi) | 文本输入提示框 | messageId | |
| mini.loading(message, title) | 加载提示框 | messageId | |
| mini.showTips(options) |
{
content: String,
state: String, //default|success|info|warning|danger
x: String, //left|center|right
y: String, //top|center|bottom
timeout: Number //自动消失间隔时间。默认2000(2秒)。
}
|
消息提示框 | |
| mini.showMessageBox(options) |
{
title: String,
message: String,
buttons: ["ok", "no", "cancel"],
iconCls: "mini-messagebox-question",
html: String,
callback: function(action){
}
}
|
显示提示框 | messageId |
| mini.hideMessageBox(messageId) | 隐藏提示框 | ||
| mini.open(options) | options :
{
targetWindow: window, //页面对象。默认是顶级页面。
url: String, //页面地址
title: String, //标题
iconCls: String, //标题图标
width: Number, //宽度
height: Number, //高度
allowResize: Boolean, //允许尺寸调节
allowDrag: Boolean, //允许拖拽位置
showCloseButton: Boolean, //显示关闭按钮
showMaxButton: Boolean, //显示最大化按钮
showModal: Boolean, //显示遮罩
loadOnRefresh: false, //true每次刷新都激发onload事件
onload: function () { //弹出页面加载完成
var iframe = this.getIFrameEl();
var data = {};
//调用弹出页面方法进行初始化
iframe.contentWindow.SetData(data);
},
ondestroy: function (action) { //弹出页面关闭前
if (action == "ok") { //如果点击“确定”
var iframe = this.getIFrameEl();
//获取选中、编辑的结果
var data = iframe.contentWindow.GetData();
data = mini.clone(data); //必须。克隆数据。
......
}
}
}
|
弹出子页面 |