修复 tab 索引获取错误

修复 tab 索引获取错误
pull/1276/head
morning-star 2023-06-08 15:57:03 +08:00 committed by GitHub
parent 834aa787cb
commit 947aeb391a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ layui.define('jquery', function(exports){
// Tab 删除
,tabDelete: function(e, othis){
var li = othis || $(this).parent();
var index = li.index('li');
var index = li.parent().children('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');