mirror of
https://github.com/PlayEdu/backend
synced 2025-07-20 00:59:40 +08:00
tree组件拖动编辑优化
This commit is contained in:
parent
c84ceee624
commit
f7c11d2cf4
@ -30,13 +30,6 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
|
|||||||
getParams();
|
getParams();
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (id === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getDetail();
|
|
||||||
}, [id]);
|
|
||||||
|
|
||||||
const getParams = () => {
|
const getParams = () => {
|
||||||
department.createDepartment().then((res: any) => {
|
department.createDepartment().then((res: any) => {
|
||||||
const departments = res.data.departments;
|
const departments = res.data.departments;
|
||||||
@ -48,6 +41,10 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
|
|||||||
});
|
});
|
||||||
setDepartments(new_arr);
|
setDepartments(new_arr);
|
||||||
}
|
}
|
||||||
|
if (id === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getDetail();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,13 +30,6 @@ export const ResourceCategoryUpdate: React.FC<PropInterface> = ({
|
|||||||
getParams();
|
getParams();
|
||||||
}, [open]);
|
}, [open]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (id === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getDetail();
|
|
||||||
}, [id]);
|
|
||||||
|
|
||||||
const getParams = () => {
|
const getParams = () => {
|
||||||
resourceCategory.createResourceCategory().then((res: any) => {
|
resourceCategory.createResourceCategory().then((res: any) => {
|
||||||
const categories = res.data.categories;
|
const categories = res.data.categories;
|
||||||
@ -48,6 +41,10 @@ export const ResourceCategoryUpdate: React.FC<PropInterface> = ({
|
|||||||
});
|
});
|
||||||
setCategories(new_arr);
|
setCategories(new_arr);
|
||||||
}
|
}
|
||||||
|
if (id === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getDetail();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user