mirror of
https://github.com/PlayEdu/backend
synced 2025-06-18 11:57:02 +08:00
树形控件增加全部包裹
This commit is contained in:
parent
1e37e7ee1b
commit
729aa4150b
@ -18,7 +18,13 @@ export const TreeDepartment = (props: PropInterface) => {
|
||||
setLoading(true);
|
||||
department.departmentList().then((res: any) => {
|
||||
const departments = res.data.departments;
|
||||
const new_arr: Option[] = checkArr(departments, 0);
|
||||
const new_arr: Option[] = [
|
||||
{
|
||||
key: "",
|
||||
title: "全部",
|
||||
children: checkArr(departments, 0),
|
||||
},
|
||||
];
|
||||
setTreeData(new_arr);
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user