From 67a13c2ac4bb94c8e3bbaf2fff3b2ffd54716c62 Mon Sep 17 00:00:00 2001 From: sentsin Date: Sun, 3 Sep 2017 06:48:40 +0800 Subject: [PATCH] 2.1.2 --- bower.json | 2 +- package.json | 2 +- src/css/layui.css | 2 +- src/lay/modules/laydate.js | 4 ++-- src/lay/modules/table.js | 11 ++++++----- src/layui.js | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bower.json b/bower.json index 3e4e384e..a496eabf 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "layui", "main": "src/layui.js", - "version": "2.1.1", + "version": "2.1.2", "homepage": "https://github.com/sentsin/layui", "authors": [ "sentsin " diff --git a/package.json b/package.json index aaa5cae6..573ff768 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "layui", - "version": "2.1.1", + "version": "2.1.2", "layimV": "3.7.0", "description": "经典模块化前端框架", "main": "layui.js", diff --git a/src/css/layui.css b/src/css/layui.css index 7c909bb7..1283c3e7 100644 --- a/src/css/layui.css +++ b/src/css/layui.css @@ -339,7 +339,7 @@ a cite{font-style: normal; *cursor:pointer;} .layui-btn-group+.layui-btn-group{margin-left: 10px;} /** 表单 **/ -.layui-input, .layui-textarea, .layui-select{height: 38px; line-height: 38px; line-height: 36px\9; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;} +.layui-input, .layui-textarea, .layui-select{height: 38px; line-height: 36px\9; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;} .layui-input, .layui-textarea{display: block; width: 100%; padding-left: 10px;} .layui-input:hover, .layui-textarea:hover{border-color: #D2D2D2 !important;} .layui-input:focus, .layui-textarea:focus{border-color: #C9C9C9 !important;} diff --git a/src/lay/modules/laydate.js b/src/lay/modules/laydate.js index 5f975d4f..e21990a2 100644 --- a/src/lay/modules/laydate.js +++ b/src/lay/modules/laydate.js @@ -1,6 +1,6 @@ /** - @Name : layDate 5.0.4 日期时间控件 + @Name : layDate 5.0.5 日期时间控件 @Author: 贤心 @Site:http://www.layui.com/laydate/ @License:MIT @@ -55,7 +55,7 @@ } ,laydate = { - v: '5.0.4' + v: '5.0.5' ,config: {} //全局配置项 ,index: (window.laydate && window.laydate.v) ? 100000 : 0 ,path: ready.getPath diff --git a/src/lay/modules/table.js b/src/lay/modules/table.js index 7e894281..976cea8d 100644 --- a/src/lay/modules/table.js +++ b/src/lay/modules/table.js @@ -274,7 +274,6 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ var params = {}; params[request.pageName] = curr; params[request.limitName] = options.limit; - $.ajax({ type: options.method || 'get' ,url: options.url @@ -283,7 +282,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ ,success: function(res){ if(res[response.statusName] != response.statusCode){ that.renderForm(); - return that.layMain.html('
'+ (res[response.msgName] || '返回的数据状态异常') +'
');; + return that.layMain.html('
'+ (res[response.msgName] || '返回的数据状态异常') +'
'); } that.renderData(res, curr, res[response.countName]), sort(); loadIndex && layer.close(loadIndex); @@ -397,6 +396,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ that.scrollPatch(); }, 50); that.haveInit = true; + layer.close(that.tipsIndex); }; that.key = options.id || options.index; @@ -521,8 +521,8 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ return layer.msg('数据请求中', { icon: 16 ,offset: [ - that.layTool.offset().top - 100 - _WIN.scrollTop() + 'px' - ,that.layTool.offset().left + that.layTool.width()/2 - 90 - _WIN.scrollLeft() + 'px' + that.elem.offset().top + that.elem.height()/2 - 35 - _WIN.scrollTop() + 'px' + ,that.elem.offset().left + that.elem.width()/2 - 90 - _WIN.scrollLeft() + 'px' ] ,anim: -1 ,fixed: false @@ -606,6 +606,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ //滚动条补丁 Class.prototype.scrollPatch = function(){ var that = this + ,layMainTable = that.layMain.children('table') ,scollWidth = that.layMain.width() - that.layMain.prop('clientWidth') //纵向滚动条宽度 ,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); //横向滚动条高度 if(scollWidth && scollHeight){ @@ -620,7 +621,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){ that.layHeader.eq(0).find('.layui-table-patch').remove(); } that.layFixed.find(ELEM_BODY).css('height', that.layMain.height() - scollHeight); //固定列区域高度 - that.layFixRight[scollHeight ? 'removeClass' : 'addClass'](HIDE); + that.layFixRight[layMainTable.width() > that.layMain.width() ? 'removeClass' : 'addClass'](HIDE); //表格宽度小于容器宽度时,隐藏固定列 that.layFixRight.css('right', scollWidth - 1); //操作栏 }; diff --git a/src/layui.js b/src/layui.js index 8b873f60..1cbb3662 100644 --- a/src/layui.js +++ b/src/layui.js @@ -19,7 +19,7 @@ } ,Layui = function(){ - this.v = '2.1.1'; //版本号 + this.v = '2.1.2'; //版本号 } //获取layui所在目录