tree组件删除家在优化

This commit is contained in:
禺狨 2023-03-21 11:25:19 +08:00
parent 49d6fdbecc
commit ab4cc8e59e
2 changed files with 0 additions and 24 deletions

View File

@ -149,19 +149,7 @@ export const DepartmentPage: React.FC = () => {
if (id === 0) {
return;
}
const instance = modal.warning({
title: "操作确认",
centered: true,
content: (
<div className="j-flex">
<Spin tip="检查中" />
</div>
),
});
department.checkDestroy(id).then((res: any) => {
setTimeout(() => {
instance.destroy();
}, 500);
if (
res.data.children.length === 0 &&
res.data.courses.length === 0 &&

View File

@ -147,19 +147,7 @@ export const ResourceCategoryPage: React.FC = () => {
if (id === 0) {
return;
}
const instance = modal.warning({
title: "操作确认",
centered: true,
content: (
<div className="j-flex">
<Spin tip="检查中" />
</div>
),
});
resourceCategory.checkDestroy(id).then((res: any) => {
setTimeout(() => {
instance.destroy();
}, 500);
if (
res.data.children.length === 0 &&
res.data.courses.length === 0 &&