This commit is contained in:
贤心
2021-04-02 06:05:38 +08:00
parent 2705982246
commit 74e8842789
10 changed files with 115 additions and 58 deletions

View File

@@ -249,15 +249,15 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-header a:hover{transition: all .5s; -webkit-transition: all .5s;}
.layui-side{position: fixed; left: 0; top: 0; bottom: 0; z-index: 999; width: 200px; overflow-x: hidden;}
.layui-side-scroll{position: relative; width: 220px; height: 100%; overflow-x: hidden;}
.layui-body{position: absolute; left: 200px; right: 0; top: 0; bottom: 0; z-index: 900; width: auto; overflow: hidden; overflow-y: auto; box-sizing: border-box;}
.layui-body{position: relative; left: 200px; right: 0; top: 0; bottom: 0; z-index: 900; width: auto; box-sizing: border-box;}
/* 后台框架大布局 */
.layui-layout-body{overflow-x: hidden;}
.layui-layout-admin .layui-header{position: fixed; top: 0; left: 0; right: 0; background-color: #23262E;}
.layui-layout-admin .layui-side{top: 60px; width: 200px; overflow-x: hidden;}
.layui-layout-admin .layui-body{bottom: auto; padding-bottom: 44px;}
.layui-layout-admin .layui-body{position: absolute; top: 60px; padding-bottom: 44px;}
.layui-layout-admin .layui-main{width: auto; margin: 0 15px;}
.layui-layout-admin .layui-footer{position: fixed; left: 200px; right: 0; bottom: 0; z-index: 990; height: 44px; line-height: 44px; padding: 0 15px; background-color: #eee;}
.layui-layout-admin .layui-footer{position: fixed; left: 200px; right: 0; bottom: 0; z-index: 990; height: 44px; line-height: 44px; padding: 0 15px; box-shadow: -1px 0 4px rgb(0 0 0 / 12%); background-color: #FAFAFA;}
.layui-layout-admin .layui-logo{position: absolute; left: 0; top: 0; width: 200px; height: 100%; line-height: 60px; text-align: center; color: #009688; font-size: 16px;}
.layui-layout-admin .layui-header .layui-nav{background: none;}
.layui-layout-left{position: absolute !important; left: 200px; top: 0;}

View File

@@ -17,7 +17,7 @@
}
,Layui = function(){
this.v = '2.6.1'; //版本号
this.v = '2.6.2'; //版本号
}
//获取layui所在目录

View File

@@ -228,15 +228,11 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
,Class = function(options){
var that = this;
that.index = ++table.index;
that.config = $.extend({}, that.config, $.extend(true, {}, table.config, options));
that.config = $.extend({}, that.config, table.config, options);;
that.render();
if(!that.init_config){
that.init_config = $.extend({}, that.config); //记录初始执行的参数
}
};
//默认配置
//初始默认配置
Class.prototype.config = {
limit: 10 //每页显示的数量
,loading: true //请求数据时是否显示loading
@@ -647,13 +643,13 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
options = options || {};
delete that.haveInit;
//如果直接传入数组 data则移除原来的数组以免数组发生深度拷贝
if(options.data && options.data.constructor === Array) delete that.config.data;
that.config = $.extend({}, that.config, function(){
return deep ? $.extend(true, {}, that.init_config, table.config, options)
: $.extend(true, {}, table.config, options);
}());
//对参数进行深度或浅扩展
that.config = $.extend(deep, {}, that.config, options);
//执行渲染
that.render();
};
@@ -1042,6 +1038,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
//字段匹配
if(typeof th === 'string'){
field = th;
that.layHeader.find('th').each(function(i, item){
var othis = $(this)
,_field = othis.data('field');
@@ -1069,7 +1066,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
elemSort.attr('lay-sort', type || null);
that.layFixed.find('th')
} catch(e){
return hint.error('Table modules: Did not match to field');
hint.error('Table modules: sort field \''+ field +'\' not matched');
}
//记录排序索引和类型