Przeglądaj źródła

修改菜单选中状态失效问题

RuoYi 5 lat temu
rodzic
commit
ce18a9e86d

+ 3 - 3
ruoyi-admin/src/main/resources/static/css/style.css

@@ -3254,7 +3254,7 @@ body.body-small .footer.fixed {
 
 .content-tabs .roll-nav, .page-tabs-list {
     position: absolute;
-    width: 40px;
+    width: 30px;
     height: 38px;
     text-align: center;
     color: #999;
@@ -3285,9 +3285,9 @@ body.body-small .footer.fixed {
 }
 
 nav.page-tabs {
-    margin-left: 40px;
+    margin-left: 30px;
     width: 100000px;
-    height: 40px;
+    height: 38px;
     overflow: hidden;
 }
 

+ 2 - 0
ruoyi-admin/src/main/resources/static/ruoyi/index.js

@@ -216,6 +216,8 @@ $(function() {
         dataIndex = $(this).data('index'),
         menuName = $.trim($(this).text()),
         flag = true;
+        $(".nav ul li").removeClass("active");
+        $(this).parent("li").addClass("active");
         if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
 
         // 选项卡菜单已存在