$.extend($.fn.layout.methods, {
fullScreen: function (jq) {
return jq.each(function () {
var layout = $(this);
var center = layout.layout('panel', 'south');
center.panel('maximize');
center.parent().css('z-index', 20);
$(window).on('resize.full', function () {
layout.layout('unFullScreen').layout('resize');
});
});
},
unFullScreen: function (jq) {
return jq.each(function () {
var center = $(this).layout('panel', 'south');
center.parent().css('z-index', 'inherit');
center.panel('restore');
$(window).off('resize.full');
});
}
}); <div id="detail"
style="height:50%"
data-options="region:'south',
title:'明细',
collapsed:true,
split:true,
tools: [{
iconCls:'icon-arrow_out',
handler:fullOrUnfull
}]">
</div>// 全屏的时候点击取消执行全屏,取消全屏的时候点击执行全屏
var flag=1
function fullOrUnfull(){
flag == 1 ? $('#layoutId').layout("fullScreen") : $('#layoutId').layout("unFullScreen");
flag = flag == 1 ? 0 : 1;
}