mirror of
https://github.com/PlayEdu/backend
synced 2025-06-18 19:36:58 +08:00
树形控件增加全部包裹
This commit is contained in:
parent
1e37e7ee1b
commit
729aa4150b
@ -18,7 +18,13 @@ export const TreeDepartment = (props: PropInterface) => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
department.departmentList().then((res: any) => {
|
department.departmentList().then((res: any) => {
|
||||||
const departments = res.data.departments;
|
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);
|
setTreeData(new_arr);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user