EasyUI實現第二層彈出框的方法

來源:互聯網
上載者:User

EasyUI實現第二層彈出框的方法

 本文給大家分享的是一則使用EasyUI實現第二層彈出框的方法,核心代碼是網友提供,這裡結合自己的項目需求,完善了下,推薦給大家。

 

 

這是網友在EasyUI拓展時的代碼。

可以根據實際需要自行修改。

$.modalDialog2.handler 這個handler代表彈出的dialog控制代碼
$.modalDialog2.xxx 這個xxx是可以自己定義名稱,主要用在彈窗關閉時,重新整理某些對象的操作,可以將xxx這個對象預定義好

 

代碼如下:


$.modalDialogTwo = function(options) {
if ($.modalDialogTwo.handler == undefined) {// 避免重複彈出
var opts = $.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實現第二層彈出框的方法,希望大家能夠喜歡。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.