layUI框架的官方文档没有layer弹框最大化、最小化、还原按钮的回调函数方法,我的站长站也是找了好久,收藏备份,以便后期使用。
layer.open({
type: 2,
skin: 'wdzzz',
title: '我的站长站',
fix: false,
shadeClose: false,
shade: false,
maxmin: true,
min: function(){
$('.layui-layer').css({
'top': 'auto',
'left': 'auto',
'bottom': '27px',
'right': '0'
})
},
full: function() {
alert('最大化');
},
restore: function() {
alert('还原');
}
area: ['90%', '90%'],
content: https://www.wdzzz.com/'
});其中min: function() 为最小化回调方法,full: function()为最大化回调方法,restore: function()为还原原始大小回调方法,测试可用。

