From 24d21eda23aa321ea43ec4caf305b64cb8529b2d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Sep 2023 10:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=AA=E5=90=91=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=85=B3=E9=97=AD=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98(I7SVPK)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index 5a60670cf..445c7cdf0 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -73,9 +73,10 @@ $(window).bind("load resize", function() { }); function syncMenuTab(dataId) { - if(isLinkage) { + if(isLinkage) { var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]'); if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) { + $('.tab-pane li').removeClass("active"); $('.nav ul').removeClass("in"); $dataObj.parents("ul").addClass("in") $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); @@ -340,6 +341,7 @@ $(function() { var panelUrl = $(this).parents('.menuTab').data('panel'); // 当前元素处于活动状态 if ($(this).parents('.menuTab').hasClass('active')) { + syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); // 当前元素后面有同辈元素,使后面的一个元素处于活动状态 if ($(this).parents('.menuTab').next('.menuTab').length) {