From 09aa02ef3b4c330a57882887230b3ba282688edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Thu, 23 Jul 2020 04:55:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=89=E9=A1=B9=E5=8D=A1?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/layui/lay/extends/pearTab.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/component/layui/lay/extends/pearTab.js b/component/layui/lay/extends/pearTab.js index 202bf94..f451d0b 100644 --- a/component/layui/lay/extends/pearTab.js +++ b/component/layui/lay/extends/pearTab.js @@ -373,6 +373,16 @@ layui.define(['jquery', 'element'], function(exports) { // 删除指定 id 的 title var removeTab = tabTitle.find("li[lay-id='" + id + "']"); + + if(!removeTab.hasClass("layui-this")){ + removeTab.remove(); + + // 删除 content + var tabContent = $(".layui-tab[lay-filter='" + elem + "']").find("iframe[id='" + id + "']").parent(); + + return false; + } + var nextNode = removeTab.next("li");