Merge pull request #1212 from layui/2.x

release v2.8.0-rc.13
pull/1213/head v2.8.0-rc.13
贤心 2023-03-12 10:49:36 +08:00 committed by GitHub
commit 701c48d844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 36 deletions

2
dist/css/layui.css vendored

File diff suppressed because one or more lines are too long

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "layui", "name": "layui",
"version": "2.8.0-rc.12", "version": "2.8.0-rc.13",
"description": "Classic modular Front-End UI library", "description": "Classic modular Front-End UI library",
"main": "dist/layui.js", "main": "dist/layui.js",
"license": "MIT", "license": "MIT",

View File

@ -29,6 +29,7 @@ a cite{font-style: normal; *cursor:pointer;}
/* 消除第三方ui可能造成的冲突 */.layui-box, .layui-box *{box-sizing: content-box;} /* 消除第三方ui可能造成的冲突 */.layui-box, .layui-box *{box-sizing: content-box;}
.layui-clear{clear: both; *zoom: 1;} .layui-clear{clear: both; *zoom: 1;}
.layui-clear:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;} .layui-clear:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;}
.layui-clear-space{word-spacing: -5px;}
.layui-inline{position: relative; display: inline-block; *display:inline; *zoom:1; vertical-align: middle;} .layui-inline{position: relative; display: inline-block; *display:inline; *zoom:1; vertical-align: middle;}
/* 三角形 */.layui-edge{position: relative; display: inline-block; vertical-align: middle; width: 0; height: 0; border-width: 6px; border-style: dashed; border-color: transparent; overflow: hidden;} /* 三角形 */.layui-edge{position: relative; display: inline-block; vertical-align: middle; width: 0; height: 0; border-width: 6px; border-style: dashed; border-color: transparent; overflow: hidden;}
.layui-edge-top{top: -4px; border-bottom-color: #999; border-bottom-style: solid;} .layui-edge-top{top: -4px; border-bottom-color: #999; border-bottom-style: solid;}
@ -47,12 +48,12 @@ a cite{font-style: normal; *cursor:pointer;}
/** 图标字体 **/ /** 图标字体 **/
@font-face { @font-face {
font-family: 'layui-icon'; font-family: 'layui-icon';
src: url('../font/iconfont.eot?v=256'); src: url('../font/iconfont.eot?v=280');
src: url('../font/iconfont.eot?v=256#iefix') format('embedded-opentype'), src: url('../font/iconfont.eot?v=280#iefix') format('embedded-opentype'),
url('../font/iconfont.woff2?v=256') format('woff2'), url('../font/iconfont.woff2?v=280') format('woff2'),
url('../font/iconfont.woff?v=256') format('woff'), url('../font/iconfont.woff?v=280') format('woff'),
url('../font/iconfont.ttf?v=256') format('truetype'), url('../font/iconfont.ttf?v=280') format('truetype'),
url('../font/iconfont.svg?v=256#layui-icon') format('svg'); url('../font/iconfont.svg?v=280#layui-icon') format('svg');
} }
.layui-icon{ .layui-icon{
@ -1016,7 +1017,6 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-table-tool-panel li .layui-form-checkbox[lay-skin="primary"] span{padding: 0;} .layui-table-tool-panel li .layui-form-checkbox[lay-skin="primary"] span{padding: 0;}
.layui-table-tool .layui-table-tool-self .layui-table-tool-panel{left: auto; right: -1px;} .layui-table-tool .layui-table-tool-self .layui-table-tool-panel{left: auto; right: -1px;}
.layui-table-col-special{word-spacing: -5px;}
.layui-table-col-set{position: absolute; right: 0; top: 0; width: 20px; height: 100%; border-width: 0; border-left-width: 1px; background-color: #fff;} .layui-table-col-set{position: absolute; right: 0; top: 0; width: 20px; height: 100%; border-width: 0; border-left-width: 1px; background-color: #fff;}
.layui-table-sort{width: 10px; height: 20px; margin-left: 5px; cursor: pointer!important;} .layui-table-sort{width: 10px; height: 20px; margin-left: 5px; cursor: pointer!important;}
@ -1344,9 +1344,9 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
.layui-carousel[lay-indicator="outside"] .layui-carousel-ind ul{background-color: rgba(0,0,0,.5);} .layui-carousel[lay-indicator="outside"] .layui-carousel-ind ul{background-color: rgba(0,0,0,.5);}
.layui-carousel[lay-indicator="none"] .layui-carousel-ind{display: none;} .layui-carousel[lay-indicator="none"] .layui-carousel-ind{display: none;}
.layui-carousel-ind ul{display: inline-block; padding: 5px; background-color: rgba(0,0,0,.2); border-radius: 10px; -webkit-transition-duration: .3s; transition-duration: .3s;} .layui-carousel-ind ul{display: inline-block; padding: 5px; background-color: rgba(0,0,0,.2); border-radius: 10px; -webkit-transition-duration: .3s; transition-duration: .3s;}
.layui-carousel-ind li{display: inline-block; width: 10px; height: 10px; margin: 0 3px; font-size: 14px; background-color: #eee; background-color: rgba(255,255,255,.5); border-radius: 50%; cursor: pointer; -webkit-transition-duration: .3s; transition-duration: .3s;} .layui-carousel-ind ul li{display: inline-block; width: 10px; height: 10px; margin: 0 3px; font-size: 14px; background-color: #eee; background-color: rgba(255,255,255,.5); border-radius: 50%; cursor: pointer; -webkit-transition-duration: .3s; transition-duration: .3s;}
.layui-carousel-ind li:hover{background-color: rgba(255,255,255,.7);} .layui-carousel-ind ul li:hover{background-color: rgba(255,255,255,.7);}
.layui-carousel-ind li.layui-this{background-color: #fff;} .layui-carousel-ind ul li.layui-this{background-color: #fff;}
.layui-carousel>*[carousel-item]>.layui-this, .layui-carousel>*[carousel-item]>.layui-this,
.layui-carousel>*[carousel-item]>.layui-carousel-prev, .layui-carousel>*[carousel-item]>.layui-carousel-prev,
.layui-carousel>*[carousel-item]>.layui-carousel-next{display: block} .layui-carousel>*[carousel-item]>.layui-carousel-next{display: block}

View File

@ -15,7 +15,7 @@
} }
,Layui = function(){ ,Layui = function(){
this.v = '2.8.0-rc.12'; // Layui 版本号 this.v = '2.8.0-rc.13'; // Layui 版本号
} }
//识别预先可能定义的指定全局对象 //识别预先可能定义的指定全局对象

View File

@ -153,9 +153,9 @@ layui.define('jquery', function(exports){
,tabDelete: function(e, othis){ ,tabDelete: function(e, othis){
var li = othis || $(this).parent(); var li = othis || $(this).parent();
var index = li.index(); var index = li.index();
var parents = li.parents('.layui-tab').eq(0); var tabElem = li.closest('.layui-tab');
var item = parents.children('.layui-tab-content>.layui-tab-item'); var item = tabElem.children('.layui-tab-content').children('.layui-tab-item');
var filter = parents.attr('lay-filter'); var filter = tabElem.attr('lay-filter');
if(li.hasClass(THIS)){ if(li.hasClass(THIS)){
if (li.next()[0] && li.next().is('li')){ if (li.next()[0] && li.next().is('li')){
@ -174,7 +174,7 @@ layui.define('jquery', function(exports){
}, 50); }, 50);
layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', { layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', {
elem: parents, elem: tabElem,
index: index index: index
}); });
} }

View File

@ -1691,19 +1691,19 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
//滚动条补丁 //滚动条补丁
Class.prototype.scrollPatch = function(){ Class.prototype.scrollPatch = function(){
var that = this var that = this;
,layMainTable = that.layMain.children('table') var layMainTable = that.layMain.children('table');
,scollWidth = that.layMain.width() - that.layMain.prop('clientWidth') //纵向滚动条宽度 var scollWidth = that.layMain.width() - that.layMain.prop('clientWidth'); // 纵向滚动条宽度
,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight') //横向滚动条高度 var scollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); // 横向滚动条高度
,getScrollWidth = that.getScrollWidth(that.layMain[0]) //获取主容器滚动条宽度,如果有的话 var getScrollWidth = that.getScrollWidth(that.layMain[0]); // 获取主容器滚动条宽度,如果有的话
,outWidth = layMainTable.outerWidth() - that.layMain.width() //表格内容器的超出宽度 var outWidth = layMainTable.outerWidth() - that.layMain.width(); // 表格内容器的超出宽度
//添加补丁 // 添加补丁
,addPatch = function(elem){ var addPatch = function(elem){
if(scollWidth && scollHeight){ if(scollWidth && scollHeight){
elem = elem.eq(0); elem = elem.eq(0);
if(!elem.find('.layui-table-patch')[0]){ if(!elem.find('.layui-table-patch')[0]){
var patchElem = $('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>'); //补丁元素 var patchElem = $('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>'); // 补丁元素
patchElem.find('div').css({ patchElem.find('div').css({
width: scollWidth width: scollWidth
}); });
@ -1712,20 +1712,28 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
} else { } else {
elem.find('.layui-table-patch').remove(); elem.find('.layui-table-patch').remove();
} }
} };
addPatch(that.layHeader); addPatch(that.layHeader);
addPatch(that.layTotal); addPatch(that.layTotal);
//固定列区域高度 // 固定列区域高度
var mainHeight = that.layMain.height() var mainHeight = that.layMain.height();
,fixHeight = mainHeight - scollHeight; var fixHeight = mainHeight - scollHeight;
that.layFixed.find(ELEM_BODY).css('height', layMainTable.height() >= fixHeight ? fixHeight : 'auto');
//表格宽度小于容器宽度时,隐藏固定列 that.layFixed.find(ELEM_BODY).css(
that.layFixRight[outWidth > 0 ? 'removeClass' : 'addClass'](HIDE); 'height',
layMainTable.height() >= fixHeight ? fixHeight : 'auto'
);
//操作栏 // 表格宽度小于容器宽度时,隐藏固定列
that.layFixRight[
table.cache[that.key].length && outWidth > 0
? 'removeClass'
: 'addClass'
](HIDE);
// 操作栏
that.layFixRight.css('right', scollWidth - 1); that.layFixRight.css('right', scollWidth - 1);
}; };