EasyUI实现第二层弹出框的方法
这是网友在EasyUI拓展时的代码。
可以根据实际需要自行修改。
$.modalDialog2.handler这个handler代表弹出的dialog句柄
$.modalDialog2.xxx这个xxx是可以自己定义名称,主要用在弹窗关闭时,刷新某些对象的操作,可以将xxx这个对象预定义好
$.modalDialogTwo=function(options){
if($.modalDialogTwo.handler==undefined){//避免重复弹出
varopts=$.extend({
title:'',
width:840,
height:680,
modal:true,
onClose:function(){
$.modalDialogTwo.handler=undefined;
$(this).dialog('destroy');
},
onOpen:function(){
//parent.$.messager.progress({
//title:'提示',
//text:'数据加载中,请稍后....'
//});
}
},options);
opts.modal=true;//强制此dialog为模式化,无视传递过来的modal参数
return$.modalDialogTwo.handler=$('<div/>').dialog(opts);
}
};
以上就是个人使用EasyUI实现第二层弹出框的方法,希望大家能够喜欢。