From 0a89d275e5c61f57eecdd76bf946b0c5b4fe5a18 Mon Sep 17 00:00:00 2001 From: morning-star <26325820+Sight-wcg@users.noreply.github.com> Date: Sat, 4 May 2024 16:29:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(element.tab):=20=E6=94=B9=E8=BF=9B=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=20tab=20=E7=9A=84=E7=B4=A2=E5=BC=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=20(#1853)?= 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 631f6752..3d73631a 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -82,7 +82,7 @@ layui.define('jquery', function(exports){ Element.prototype.tab = function(options){ options = options || {}; dom.on('click', options.headerElem, function(e){ - var index = $(this).index(); + var index = $(options.headerElem).index($(this)); call.tabClick.call(this, { index: index, options: options