mirror of
https://github.com/PlayEdu/backend
synced 2025-06-29 19:02:44 +08:00
部门、资源为空时添加组件优化
This commit is contained in:
parent
a583c31950
commit
9dbc0831a8
@ -44,6 +44,13 @@ export const DepartmentCreate: React.FC<PropInterface> = ({
|
|||||||
value: 0,
|
value: 0,
|
||||||
});
|
});
|
||||||
setDepartments(new_arr);
|
setDepartments(new_arr);
|
||||||
|
} else {
|
||||||
|
const new_arr: Option[] = [];
|
||||||
|
new_arr.unshift({
|
||||||
|
label: "作为一级部门",
|
||||||
|
value: 0,
|
||||||
|
});
|
||||||
|
setDepartments(new_arr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,13 @@ export const ResourceCategoryCreate: React.FC<PropInterface> = ({
|
|||||||
value: 0,
|
value: 0,
|
||||||
});
|
});
|
||||||
setCategories(new_arr);
|
setCategories(new_arr);
|
||||||
|
} else {
|
||||||
|
const new_arr: Option[] = [];
|
||||||
|
new_arr.unshift({
|
||||||
|
label: "作为一级分类",
|
||||||
|
value: 0,
|
||||||
|
});
|
||||||
|
setCategories(new_arr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user