diff --git a/app/common/logic/PermLogic.php b/app/common/logic/PermLogic.php index 703737c..674fbc8 100644 --- a/app/common/logic/PermLogic.php +++ b/app/common/logic/PermLogic.php @@ -102,7 +102,7 @@ class PermLogic // component 字段规则: // 1. 存在子菜单,固定 '/index/index' // 2. 否则为当前完整路径(或其它你想要的) - $componentValue = $hasChildrenMenu && !$node->url ? '/index/index' : $currentPath; + $componentValue = ($hasChildrenMenu && !$node->url && $node->type !== 'directory') ? '/index/index' : $currentPath; $tree[] = [ 'id' => $node->id,