From 27654952e1df009595fff2e556f209b3b4f51dc2 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Sun, 4 Jun 2023 23:16:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20tab=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=20`layui-tab-title`=20=E4=B8=AD=E6=9C=89=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=85=83=E7=B4=A0=E6=97=B6=EF=BC=8Cli=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=94=99=E8=AF=AF=E7=9A=84=E4=B8=8B=E6=A0=87=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20content=20=E6=9C=AA=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/element.js b/src/modules/element.js index 17f0d67c..efc03288 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -152,7 +152,7 @@ layui.define('jquery', function(exports){ // Tab 删除 ,tabDelete: function(e, othis){ var li = othis || $(this).parent(); - var index = li.index(); + var index = li.index('li[lay-id]'); var tabElem = li.closest('.layui-tab'); var item = tabElem.children('.layui-tab-content').children('.layui-tab-item'); var filter = tabElem.attr('lay-filter'); From 60fa96f81f5b13dd651d75422d5ed32c12ba7576 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Mon, 5 Jun 2023 11:32:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=20tab=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=B6=E7=9A=84=E7=B4=A2=E5=BC=95=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/element.js b/src/modules/element.js index efc03288..87153acd 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -152,7 +152,7 @@ layui.define('jquery', function(exports){ // Tab 删除 ,tabDelete: function(e, othis){ var li = othis || $(this).parent(); - var index = li.index('li[lay-id]'); + var index = li.index('li'); var tabElem = li.closest('.layui-tab'); var item = tabElem.children('.layui-tab-content').children('.layui-tab-item'); var filter = tabElem.attr('lay-filter');