refactor: 修改数组转树状结构封装

This commit is contained in:
2025-03-15 11:11:45 +08:00
parent 58c27a1696
commit cbcee3892a

View File

@@ -24,7 +24,7 @@ if (!function_exists('array_to_tree')) {
if ($keep_pid === false) {
unset($item[$with]);
}
$children = array_to_tree($data, $item['id'], $with, $lv);
$children = array_to_tree($data, $item['id'], $with, $lv, $keep_pid);
if ($children) {
$item['children'] = $children;
}