优化 tab 删除时的索引获取

pull/1271/head
sight 2023-06-05 11:32:55 +08:00
parent 27654952e1
commit 60fa96f81f
1 changed files with 1 additions and 1 deletions

View File

@ -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');