diff --git a/src/compenents/tree-adminroles/index.tsx b/src/compenents/tree-adminroles/index.tsx index b0e6397..237790b 100644 --- a/src/compenents/tree-adminroles/index.tsx +++ b/src/compenents/tree-adminroles/index.tsx @@ -9,6 +9,7 @@ interface Option { } interface PropInterface { + refresh: boolean; type: string; text: string; onUpdate: (keys: any, title: any) => void; @@ -34,7 +35,7 @@ export const TreeAdminroles = (props: PropInterface) => { setTreeData(new_arr); } }); - }, []); + }, [props.refresh]); const onSelect = (selectedKeys: any, info: any) => { let label = "全部" + props.text; if (info) { diff --git a/src/pages/system/administrator/index.tsx b/src/pages/system/administrator/index.tsx index 2df8df6..9f05ccd 100644 --- a/src/pages/system/administrator/index.tsx +++ b/src/pages/system/administrator/index.tsx @@ -185,6 +185,7 @@ const SystemAdministratorPage = () => {