Dcat-admin框架下重新写的弹窗样式,实现设置固定最大高度弹窗滚动,实现更好的页面效果。
public function layer(){
return <<<JS
//设置高度
function resizeHeight(layero,height = 0){
var iframe = layero.find('iframe');
var parent_height = parent.document.body.clientHeight;
if(height != 0){
parent_height = parent_height * 0.6;
}
var iframe_height = parent_height-20;
layero.css({
'max-height' : parent_height+'px',
'min-height' : '450px',
'overflow' : 'hidden',
});
$(iframe).css({
'max-height' : iframe_height+'px',
'min-height' : '420px',
'over