From f453f15b714b86f31f51a8dcfc2dbedf49aaa9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 9 Aug 2023 23:17:55 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E5=88=A0=E9=99=A4=20treeTable=20?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/treeTable.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/treeTable.js b/src/modules/treeTable.js index dd033bd0..87cf5b62 100644 --- a/src/modules/treeTable.js +++ b/src/modules/treeTable.js @@ -1245,7 +1245,7 @@ layui.define(['table'], function (exports) { options.hasNumberCol && formatNumber(that); // 重新适配尺寸 - table.resize(id); + treeTable.resize(id); } /** @@ -1396,9 +1396,6 @@ layui.define(['table'], function (exports) { tableViewElem.find(ELEM_MAIN).find('tr[lay-data-index="' + newNodes[0][LAY_DATA_INDEX] + '"]').get(0).scrollIntoViewIfNeeded(); } - // 重新适配尺寸 - table.resize(id); - return newNodes; } From f7d1696ab1a3943d33236d5d666b55a83fbfb2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:32:35 +0800 Subject: [PATCH 02/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=20layer=20=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E9=BB=98=E8=AE=A4=E5=8A=A8=E7=94=BB=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E5=B1=82=E5=90=8E=EF=BC=8C=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=87=BA=E7=8E=B0=E5=BE=80=E4=B8=8A=E5=81=8F?= =?UTF-8?q?=E7=A7=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/modules/layer.css | 10 +++++----- src/modules/layer.js | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/css/modules/layer.css b/src/css/modules/layer.css index 5b45dd7a..8052b8a1 100644 --- a/src/css/modules/layer.css +++ b/src/css/modules/layer.css @@ -13,7 +13,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;} .layui-layer-content{position:relative;} .layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);} .layui-layer-setwin span, -.layui-layer-btn a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;} +.layui-layer-btn a{display: inline-block; vertical-align: middle; *display: inline; *zoom:1; } .layui-layer-move{display: none; position: fixed; *position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; filter:alpha(opacity=0); background-color: #fff; z-index: 2147483647;} .layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;} @@ -120,8 +120,8 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;} /* 标题栏 */ .layui-layer-title{padding: 0 81px 0 16px; height: 50px; line-height: 50px; border-bottom:1px solid #F0F0F0; font-size: 14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 2px 2px 0 0;} .layui-layer-setwin{position:absolute; right: 15px; *right:0; top: 16px; font-size:0; line-height: initial;} -.layui-layer-setwin span{position:relative; width: 16px; height: 16px; line-height: 18px; margin-left: 10px; text-align: center; font-size: 16px; cursor: pointer; color: #000; _overflow:hidden;} -.layui-layer-setwin .layui-layer-min:before{content: ''; position: absolute; width: 12px; height: 1px; left: 50%; top: 50%; margin: -0.5px 0 0 -6px; background-color: #2E2D3C; cursor: pointer; _overflow:hidden;} +.layui-layer-setwin span{position:relative; width: 16px; height: 16px; line-height: 18px; margin-left: 10px; text-align: center; font-size: 16px; cursor: pointer; color: #000; _overflow: hidden; box-sizing: border-box;} +.layui-layer-setwin .layui-layer-min:before{content: ''; position: absolute; width: 12px; border-bottom: 1px solid #2E2D3C; left: 50%; top: 50%; margin: -0.5px 0 0 -6px; cursor: pointer; _overflow:hidden;} .layui-layer-setwin .layui-layer-min:hover:before{background-color: #2D93CA} .layui-layer-setwin .layui-layer-max:before, .layui-layer-setwin .layui-layer-max:after{content: ''; position: absolute; left: 50%; top: 50%; z-index: 1; width: 9px; height: 9px; margin: -5px 0 0 -5px; border: 1px solid #2E2D3C;} @@ -138,10 +138,10 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;} /* 按钮栏 */ .layui-layer-btn{text-align: right; padding: 0 15px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;} -.layui-layer-btn a{height: 28px; line-height: 28px; margin: 5px 5px 0; padding: 0 15px; border: 1px solid #dedede; background-color:#fff; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;} +.layui-layer-btn a{height: 30px; line-height: 30px; margin: 5px 5px 0; padding: 0 16px; border: 1px solid #dedede; background-color: #fff; color: #333; border-radius: 2px; font-weight: 400; cursor: pointer; text-decoration: none; box-sizing: border-box;} .layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;} .layui-layer-btn a:active{opacity: 0.8;} -.layui-layer-btn .layui-layer-btn0{border-color: #1E9FFF; background-color: #1E9FFF; color:#fff;} +.layui-layer-btn .layui-layer-btn0{border-color: transparent; background-color: #1E9FFF; color:#fff;} .layui-layer-btn-l{text-align: left;} .layui-layer-btn-c{text-align: center;} diff --git a/src/modules/layer.js b/src/modules/layer.js index 4c0f4b5d..b3d774ac 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -377,7 +377,11 @@ Class.pt.vessel = function(conType, callback){ for(var i = 0, len = config.btn.length; i < len; i++){ button += ''+ config.btn[i] +'' } - return '
'+ button +'
' + return '
'+ button +'
' }() : '') + (config.resize ? '' : '') + '' From 2a60f6625a3735ba30963cad2c7659c686ee6403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:41:14 +0800 Subject: [PATCH 03/24] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20dropdown=20=E5=9C=A8?= =?UTF-8?q?=E6=9F=90=E4=BA=9B=E7=89=B9=E6=AE=8A=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E6=97=B6=E5=87=BA=E7=8E=B0=E7=9A=84=20`resiz?= =?UTF-8?q?e`=20=E4=BA=8B=E4=BB=B6=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 8681d4d8..2099296b 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -455,7 +455,7 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){ var that = thisModule.getThis(dropdown.thisId); if(!that) return; - if(!that.elemView[0] || !$('.'+ STR_ELEM)[0]){ + if((that.elemView && !that.elemView[0]) || !$('.'+ STR_ELEM)[0]){ return false; } From fe735b84df5fc985d33a42e0bc8efd2f9cc49c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:50:17 +0800 Subject: [PATCH 04/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8F=8F=E8=BF=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/versions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/versions.md b/docs/versions.md index 1294741e..5f720335 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -19,7 +19,7 @@ toc: true - #### table - 优化 在自定义模板中放置 `checkbox` 时对应的文字显示异常问题 # I7LQNO - - 调整 `totalRow` 属性在 `table.reloadData()` 数据重载时的支持 # I7R6VY + - 优化 `totalRow` 属性在 `table.reloadData()` 数据重载时的支持 # I7R6VY - #### treeTable - 修复 执行 `treeTable.addNodes()` 增加节点导致当前节点选中状态丢失的问题 # I7Q6IP - 优化 增加和删除节点时,对容器尺寸重新进行自动适配 @@ -334,7 +334,7 @@ toc: true --- -

+

2.8.0 2023-04-24

From ef1b952068720f73df102b3d6c33631ba4d284bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:50:24 +0800 Subject: [PATCH 05/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=20`table.reload()`=20?= =?UTF-8?q?=E9=80=A0=E6=88=90=20`window=20resize`=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=BB=91=E5=AE=9A=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index 30b7b83b..8dd1def4 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -2494,21 +2494,23 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ layer.close(that.tipsIndex); }); - - // 适应 - _WIN.on('resize', function(){ - that.resize(); - }); }; - //一次性事件 - ;(function(){ - //全局点击 + // 全局事件 + (function(){ + // 自适应尺寸 + _WIN.on('resize', function(){ + layui.each(thisTable.that, function(){ + this.resize(); + }); + }); + + // 全局点击 _DOC.on('click', function(){ _DOC.trigger('table.remove.tool.panel'); }); - //工具面板移除事件 + // 工具面板移除事件 _DOC.on('table.remove.tool.panel', function(){ $('.' + ELEM_TOOL_PANEL).remove(); }); From ea6d2e4fb53939d463341e9f79eeca8bc3a7630b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 11 Aug 2023 23:14:10 +0800 Subject: [PATCH 06/24] =?UTF-8?q?=E5=BE=AE=E8=B0=83=202.8.13=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=A5=E5=BF=97=E6=8F=8F=E8=BF=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/versions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions.md b/docs/versions.md index 5f720335..fcdf23b1 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -22,7 +22,7 @@ toc: true - 优化 `totalRow` 属性在 `table.reloadData()` 数据重载时的支持 # I7R6VY - #### treeTable - 修复 执行 `treeTable.addNodes()` 增加节点导致当前节点选中状态丢失的问题 # I7Q6IP - - 优化 增加和删除节点时,对容器尺寸重新进行自动适配 + - 优化 删除节点时,对容器尺寸重新进行自动适配 - #### tree - 优化 容器样式,以解决用于其他组件内部可能造成的样式异常问题 # I7QAO3 - #### dropdown From 0e4cca4e3e1b6865bb4952d9c7a05a994e9fceeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 12 Aug 2023 19:53:06 +0800 Subject: [PATCH 07/24] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20`layui.config()`=20?= =?UTF-8?q?=E7=9A=84=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/base.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/base.md b/docs/base.md index fabab0d3..f7d872f7 100644 --- a/docs/base.md +++ b/docs/base.md @@ -15,10 +15,10 @@ toc: true ``` layui.config({ - base: '' // 设定 Layui 扩展模块的所在目录,一般与 extend 方法搭配使用 + base: '', // 设定 Layui 扩展模块的所在目录,一般与 extend 方法搭配使用 version: false, // 用于更新模块缓存,默认 false。若设为 true,即让浏览器不缓存。也可设为一个任意数值 dir: 'layui/', // layui 基础目录,用于动态导入 src/layui.js 时的内置模块的加载。一般无需设置 - debug: false, // 用于开启调试模式,默认 false。若设为 true,则模块的引入节点会保留在页面 + debug: false // 用于开启调试模式,默认 false。若设为 true,则模块的引入节点会保留在页面 }); ``` From d598c8de841bf5a816c3b254c802e108f39ba0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 15 Aug 2023 11:25:56 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=20table=20=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/table/examples/editModes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/table/examples/editModes.md b/docs/table/examples/editModes.md index 9c87cf7c..c721c30a 100644 --- a/docs/table/examples/editModes.md +++ b/docs/table/examples/editModes.md @@ -3,7 +3,7 @@