From b6c11dd2cd24fd76d17ee2d62cb0dbc21c6b4a69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BF=98=E4=BF=97=E4=BA=8C=E5=B8=88=E5=85=84?=
<505097558@qq.com>
Date: Mon, 2 Mar 2026 14:58:10 +0000
Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8E=E5=8F=B0[=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E8=A7=84=E5=88=99]=EF=BC=8C=E4=BD=BF=E7=94=A8=E4=BA=86getTreeA?=
=?UTF-8?q?rrayList=EF=BC=8C=E4=BD=86=E6=9C=AA=E8=BF=94=E5=9B=9Ehaschild?=
=?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=B2=A1=E6=9C=89=E7=AE=AD=E5=A4=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 还俗二师兄 <505097558@qq.com>
---
extend/fast/Tree.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/extend/fast/Tree.php b/extend/fast/Tree.php
index 656c87c3..98ad0f88 100644
--- a/extend/fast/Tree.php
+++ b/extend/fast/Tree.php
@@ -479,6 +479,7 @@ class Tree
{
foreach ($data as $node) {
$node['level'] = $level;
+ $node['haschild'] = !empty($node['children']) ? 1 : 0;
$result[] = $node;
if (!empty($node['children'])) {
$this->getFlattenTree($node['children'], $level + 1, $result);
--
Gitee
From 18c1fd0bc40ced17baaa4ce83127165980968bab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BF=98=E4=BF=97=E4=BA=8C=E5=B8=88=E5=85=84?=
<505097558@qq.com>
Date: Mon, 2 Mar 2026 15:08:40 +0000
Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=86=E4=BC=9A=E5=91=98=E8=A7=84?=
=?UTF-8?q?=E5=88=99=E7=9A=84=E5=86=99=E6=B3=95=E4=B8=8E=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E8=A7=84=E5=88=99=E5=90=8C=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 还俗二师兄 <505097558@qq.com>
---
application/admin/controller/user/Rule.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/application/admin/controller/user/Rule.php b/application/admin/controller/user/Rule.php
index 9302dfec..f3b755eb 100644
--- a/application/admin/controller/user/Rule.php
+++ b/application/admin/controller/user/Rule.php
@@ -32,8 +32,7 @@ class Rule extends Backend
$v['remark'] = __($v['remark']);
}
unset($v);
- Tree::instance()->init($ruleList)->icon = [' ', ' ', ' '];
- $this->rulelist = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0), 'title');
+ $this->rulelist = Tree::instance()->init($ruleList)->getTreeArrayList(0);
$ruledata = [0 => __('None')];
foreach ($this->rulelist as $k => &$v) {
if (!$v['ismenu']) {
--
Gitee
From 73f33940628a3a65159633734b7b213b5ea7e5b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BF=98=E4=BF=97=E4=BA=8C=E5=B8=88=E5=85=84?=
<505097558@qq.com>
Date: Mon, 2 Mar 2026 15:09:16 +0000
Subject: [PATCH 3/3] =?UTF-8?q?=E5=B0=86=E4=BC=9A=E5=91=98=E8=A7=84?=
=?UTF-8?q?=E5=88=99=E7=9A=84=E5=86=99=E6=B3=95=E4=B8=8E=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E8=A7=84=E5=88=99=E5=90=8C=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 还俗二师兄 <505097558@qq.com>
---
public/assets/js/backend/user/rule.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/public/assets/js/backend/user/rule.js b/public/assets/js/backend/user/rule.js
index 7f2aa693..a39af313 100644
--- a/public/assets/js/backend/user/rule.js
+++ b/public/assets/js/backend/user/rule.js
@@ -105,13 +105,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
api: {
formatter: {
title: function (value, row, index) {
- value = value.toString().replace(/(&|&)nbsp;/g, ' ');
var caret = row.haschild == 1 ? '' : '';
- value = value.indexOf(" ") > -1 ? value.replace(/(.*) /, "$1" + caret) : caret + value;
value = !row.ismenu || row.status == 'hidden' ? "" + value + "" : value;
return '';
+ + (row.haschild == 1 || row.ismenu == 1 ? 'text-primary' : 'disabled') + ' btn-node-sub">' + (' '.repeat(row.level)) + (' '.repeat(parseInt(row.level) * 4)) + caret + ' ' + value + '';
},
name: function (value, row, index) {
return !row.ismenu || row.status == 'hidden' ? "" + value + "" : value;
--
Gitee