From fad64c36f0502072b279ddc28cb3c0a538f801bf Mon Sep 17 00:00:00 2001 From: Karson Date: Tue, 3 Jun 2025 11:16:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E7=B1=BB=E5=B1=95?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend/auth/rule.js | 3 ++- public/assets/js/backend/user/rule.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/assets/js/backend/auth/rule.js b/public/assets/js/backend/auth/rule.js index d63c38e9..6020ab72 100755 --- a/public/assets/js/backend/auth/rule.js +++ b/public/assets/js/backend/auth/rule.js @@ -50,7 +50,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function search: false, commonSearch: false, rowAttributes: function (row, index) { - return row.pid == 0 ? {} : {style: "display:none"}; + var expanded = $(".btn-toggle-all i").hasClass("fa-minus"); + return row.pid == 0 || expanded ? {} : {style: "display:none"}; } }); diff --git a/public/assets/js/backend/user/rule.js b/public/assets/js/backend/user/rule.js index 0ba2e809..09f3eed0 100644 --- a/public/assets/js/backend/user/rule.js +++ b/public/assets/js/backend/user/rule.js @@ -42,7 +42,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin search: false, commonSearch: false, rowAttributes: function (row, index) { - return row.pid == 0 ? {} : {style: "display:none"}; + var expanded = $(".btn-toggle-all i").hasClass("fa-minus"); + return row.pid == 0 || expanded ? {} : {style: "display:none"}; } });