From 404a6c995c04719bfb11a0c0ac870e6fb745c0e3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 17 Mar 2019 19:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=A1=A8=E6=A0=BC=E6=A0=91?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E7=BA=A7=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=B1=95?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/common.js | 6 ++++-- .../src/main/resources/templates/system/menu/menu.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index cda298a5..e18e40dd 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -103,9 +103,11 @@ $(function() { }).bind("input propertychange", $.tree.searchNode); } // tree表格树 展开/折叠 - var expandFlag = false; + var expandFlag; $("#expandAllBtn").click(function() { - if (expandFlag) { + var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll; + expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag; + if (!expandFlag) { $('#' + $.table._option.id).bootstrapTreeTable('expandAll'); } else { $('#' + $.table._option.id).bootstrapTreeTable('collapseAll'); diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html index 786cc7b6..68786089 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/menu.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/menu.html @@ -59,7 +59,7 @@ parentCode: "parentId", uniqueId: "menuId", expandAll: false, - expandFirst: true, + expandFirst: false, url: prefix + "/list", createUrl: prefix + "/add/{id}", updateUrl: prefix + "/edit/{id}",