From fb2d5d455cf871613c051f8916970da4799a0ff3 Mon Sep 17 00:00:00 2001 From: MonsterUncle <295228902@qq.com> Date: Thu, 7 Jul 2022 14:32:59 +0800 Subject: [PATCH] Update element.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tab 删除li click定位不准,加上判断tabName --- src/modules/element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/element.js b/src/modules/element.js index 089e265b..7fb8011a 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -131,9 +131,9 @@ layui.define('jquery', function(exports){ ,filter = parents.attr('lay-filter'); if(li.hasClass(THIS)){ - if(li.next()[0]){ + if (li.next()[0] && li.next()[0].tagName === 'LI'){ call.tabClick.call(li.next()[0], null, index + 1); - } else if(li.prev()[0]){ + } else if (li.prev()[0] && li.prev()[0].tagName === 'LI'){ call.tabClick.call(li.prev()[0], null, index - 1); } }