修复一些问题

pull/1135/head
sunxiaobin89 2022-09-15 13:41:02 +08:00
parent 016ea2085a
commit 3fd217676a
3 changed files with 46 additions and 13 deletions

View File

@ -121,7 +121,7 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
.laydate-day-mark::after{background-color: #5FB878;} .laydate-day-mark::after{background-color: #5FB878;}
.layui-laydate-content td.layui-this .laydate-day-mark::after{display: none;} .layui-laydate-content td.layui-this .laydate-day-mark::after{display: none;}
.layui-laydate-footer span[lay-type="date"]{color: #5FB878;} .layui-laydate-footer span[lay-type="date"]{color: #5FB878;}
.layui-laydate .layui-this{background-color: #009688 !important; color: #fff !important;} .layui-laydate .layui-this,.layui-laydate .layui-this>div{background-color: #009688 !important; color: #fff !important;}
.layui-laydate .laydate-disabled, .layui-laydate .laydate-disabled,
.layui-laydate .laydate-disabled:hover{background:none !important; color: #d2d2d2 !important; cursor: not-allowed !important; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;} .layui-laydate .laydate-disabled:hover{background:none !important; color: #d2d2d2 !important; cursor: not-allowed !important; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
.layui-laydate-content td>div{padding: 7px 0;height: 100%;} .layui-laydate-content td>div{padding: 7px 0;height: 100%;}

View File

@ -988,12 +988,24 @@ layer.style = function(index, options, limit){
//最小化 //最小化
layer.min = function(index, options){ layer.min = function(index, options){
options = options || {}; options = options || {};
var layero = $('#'+ doms[0] + index) var layero = $('#'+ doms[0] + index);
,shadeo = $('#'+ doms.SHADE + index)
,titHeight = layero.find(doms[1]).outerHeight() || 0 var maxminStatus = layero.data('maxminStatus');
,left = layero.attr('minLeft') || (181*ready.minIndex)+'px' // 检查当前的状态是否已经是最小化
,position = layero.css('position') if (maxminStatus === 'min') {
,settings = { return;
}
// 当前处于最大化的状态 先恢初始状态再执行最小化
if (maxminStatus === 'max') {
layer.restore(index);
}
layero.data('maxminStatus', 'min');
var shadeo = $('#'+ doms.SHADE + index);
var titHeight = layero.find(doms[1]).outerHeight() || 0;
var left = layero.attr('minLeft') || (181*ready.minIndex)+'px';
var position = layero.css('position')
var settings = {
width: 180 width: 180
,height: titHeight ,height: titHeight
,position: 'fixed' ,position: 'fixed'
@ -1029,10 +1041,13 @@ layer.min = function(index, options){
//还原 //还原
layer.restore = function(index){ layer.restore = function(index){
var layero = $('#'+ doms[0] + index) var layero = $('#'+ doms[0] + index);
,shadeo = $('#'+ doms.SHADE + index) // 恢复最大最小状态
,area = layero.attr('area').split(',') layero.data('maxminStatus', '');
,type = layero.attr('type');
var shadeo = $('#'+ doms.SHADE + index);
var area = layero.attr('area').split(',');
var type = layero.attr('type');
//恢复原来尺寸 //恢复原来尺寸
layer.style(index, { layer.style(index, {
@ -1056,6 +1071,15 @@ layer.restore = function(index){
//全屏 //全屏
layer.full = function(index){ layer.full = function(index){
var layero = $('#'+ doms[0] + index), timer; var layero = $('#'+ doms[0] + index), timer;
// 检查当前的状态是否已经是最小化
var maxminStatus = layero.data('maxminStatus');
if (maxminStatus === 'max') {
return;
}
if (maxminStatus === 'min') {
layer.restore(index);
}
layero.data('maxminStatus', 'max');
ready.record(layero); ready.record(layero);
if(!doms.html.attr('layer-full')){ if(!doms.html.attr('layer-full')){
doms.html.css('overflow','hidden').attr('layer-full', index); doms.html.css('overflow','hidden').attr('layer-full', index);

View File

@ -1567,7 +1567,16 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
bodyHeight -= (that.layPage.outerHeight() || 43); bodyHeight -= (that.layPage.outerHeight() || 43);
} }
if (options.adaptiveHeight) {
layui.each({elem: height, layMain: bodyHeight}, function (elemName, elemHeight) {
that[elemName].css({
height: 'auto',
maxHeight: elemHeight + 'px'
});
});
} else {
that.layMain.outerHeight(bodyHeight); that.layMain.outerHeight(bodyHeight);
}
}; };
//获取滚动条宽度 //获取滚动条宽度