mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
层级转换增加前缀;
This commit is contained in:
@@ -175,6 +175,7 @@ function array2level($array, $pid = 0, $level = 1)
|
||||
foreach ($array as $v) {
|
||||
if ($v['pid'] == $pid) {
|
||||
$v['level'] = $level;
|
||||
$v['prefix'] = str_repeat('|--', $level);
|
||||
$list[] = $v;
|
||||
array2level($array, $v['id'], $level + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user