修复一些问题

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;}
.layui-laydate-content td.layui-this .laydate-day-mark::after{display: none;}
.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: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%;}

View File

@ -988,18 +988,30 @@ layer.style = function(index, options, limit){
//最小化
layer.min = function(index, options){
options = options || {};
var layero = $('#'+ doms[0] + index)
,shadeo = $('#'+ doms.SHADE + index)
,titHeight = layero.find(doms[1]).outerHeight() || 0
,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
,position = layero.css('position')
,settings = {
var layero = $('#'+ doms[0] + index);
var maxminStatus = layero.data('maxminStatus');
// 检查当前的状态是否已经是最小化
if (maxminStatus === 'min') {
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
,height: titHeight
,position: 'fixed'
,overflow: 'hidden'
};
//记录宽高坐标,用于还原
ready.record(layero);
@ -1029,10 +1041,13 @@ layer.min = function(index, options){
//还原
layer.restore = function(index){
var layero = $('#'+ doms[0] + index)
,shadeo = $('#'+ doms.SHADE + index)
,area = layero.attr('area').split(',')
,type = layero.attr('type');
var layero = $('#'+ doms[0] + index);
// 恢复最大最小状态
layero.data('maxminStatus', '');
var shadeo = $('#'+ doms.SHADE + index);
var area = layero.attr('area').split(',');
var type = layero.attr('type');
//恢复原来尺寸
layer.style(index, {
@ -1056,6 +1071,15 @@ layer.restore = function(index){
//全屏
layer.full = function(index){
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);
if(!doms.html.attr('layer-full')){
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);
}
that.layMain.outerHeight(bodyHeight);
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);
}
};
//获取滚动条宽度