mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 03:39:34 +08:00
添加、创建相关api请求逻辑优化
This commit is contained in:
@@ -24,7 +24,9 @@ export const DepartmentCreate: React.FC<PropInterface> = ({
|
||||
const [parent_id, setParentId] = useState<number>(0);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -27,7 +27,9 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
|
||||
const [sort, setSort] = useState<number>(0);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
const getParams = () => {
|
||||
|
||||
Reference in New Issue
Block a user