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