diff --git a/src/modules/element.js b/src/modules/element.js index ef265212..d9105281 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -154,7 +154,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'); var tabElem = li.closest('.layui-tab'); var item = tabElem.children('.layui-tab-content').children('.layui-tab-item'); var filter = tabElem.attr('lay-filter');