將Dialog的modal屬性設置為true,可以解決卡死的問題(但會給用戶使用體驗帶來影響) 1 var par = { 2 title: This.title, 3 width: This.width, 4 height: This.height, 5 cache: This.cache, 6 ...
將Dialog的modal屬性設置為true,可以解決卡死的問題(但會給用戶使用體驗帶來影響)

1 var par = { 2 title: This.title, 3 width: This.width, 4 height: This.height, 5 cache: This.cache, 6 modal: This.modal, 7 resizable: This.resizable, 8 maximizable: This.maximizable, 9 onResize: This.onResize, 10 modal: true,//關鍵代碼:不然拖拽Dialog邊緣以改變視窗大小時,Dailog會被卡死;//modal:是否將窗體顯示為模式化視窗。 true 11 constrain: true,//關鍵代碼:若設為false,則窗體title可以拖拽到瀏覽器邊緣外,導致無法拖拽回來(進而導致無法關閉Dialog——此時,只有刷新當前頁面才能繼續操作軟體了)//constrain:定義是否限制窗體的位置。(該方法自1.5版開始可用) 12 onLoad: function () { 13 $("iframe[id='ifr" + This.renderID + "']").contentWindow.dialogData = This.dialogData; 14 This.onLoad(); 15 }, 16 onClose: This.onClose 17 };封裝的代碼片段