diff --git a/src/compenents/tree-department/index.tsx b/src/compenents/tree-department/index.tsx index 000d665..3da48c5 100644 --- a/src/compenents/tree-department/index.tsx +++ b/src/compenents/tree-department/index.tsx @@ -11,6 +11,7 @@ interface Option { interface PropInterface { type: string; text: string; + refresh: boolean; showNum: boolean; onUpdate: (keys: any, title: any) => void; } @@ -47,7 +48,7 @@ export const TreeDepartment = (props: PropInterface) => { } setLoading(false); }); - }, []); + }, [props.refresh]); const checkNewArr = (departments: any[], id: number, counts: any) => { const arr = []; diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx index f5b89b6..ad94cbb 100644 --- a/src/pages/course/index.tsx +++ b/src/pages/course/index.tsx @@ -89,6 +89,7 @@ const CoursePage = () => { children: (
{