Commit efc7024d authored by 陈前坚's avatar 陈前坚

perf: loading

parent e2719255
......@@ -53,7 +53,7 @@ import {
} from '@/services/userCenter/userManage/api';
const UserManage = () => {
const [treeLoading, setTreeLoading] = useState(true);
const [treeLoading, setTreeLoading] = useState(false);
const [tableLoading, setTableLoading] = useState(false);
const [loading, setLoading] = useState(true);
......@@ -319,7 +319,6 @@ const UserManage = () => {
// 获取用户机构树
useEffect(() => {
setTreeLoading(true);
updateTrees();
}, []);
......@@ -769,6 +768,7 @@ const UserManage = () => {
return (
<PageContainer className={styles.userManageContainer}>
<div className={styles.contentContainer}>
<Spin spinning={treeLoading} tip="loading...">
<div className={styles.orgContainer}>
<span style={{ padding: '8px', fontSize: '16px' }}>
机构列表
......@@ -794,8 +794,8 @@ const UserManage = () => {
/>
</Tooltip>
</span>
{treeData.length > 0 && (
<Spin spinning={treeLoading} tip="loading...">
<Tree
// showLine="true"
showIcon="true"
......@@ -805,9 +805,9 @@ const UserManage = () => {
onSelect={onSelect}
treeData={treeData.map(t => mapTree(t))}
/>
</Spin>
)}
</div>
</Spin>
<div className={styles.userContainer}>
<Table
title={getTableTitle}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment