This commit is contained in:
mkm 2023-08-24 10:14:50 +08:00
parent 461208df60
commit a2a179b26e

View File

@ -54,12 +54,13 @@ class UserMenuLists extends BaseAdminDataLists implements ListsSearchInterface
*/
public function lists(): array
{
return UserMenu::where($this->searchWhere)
$lists = UserMenu::where($this->searchWhere)
->field(['id', 'pid', 'type', 'name', 'icon', 'sort', 'paths', 'params', 'is_show', 'is_disable'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
return linear_to_tree($lists, 'children');
}
@ -73,5 +74,4 @@ class UserMenuLists extends BaseAdminDataLists implements ListsSearchInterface
{
return UserMenu::where($this->searchWhere)->count();
}
}
}