From 686cb93fab27fcddf369e127a50e8f91f22c332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=B7=9E?= Date: Tue, 15 Jun 2021 15:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9F=BA=E4=BA=8EPage=E7=BB=84=E4=BB=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/project/index.jsx | 41 ++++++++++++++++------------- src/pages/project/index.module.scss | 9 +++++-- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/pages/project/index.jsx b/src/pages/project/index.jsx index 6b15456..1cb5242 100644 --- a/src/pages/project/index.jsx +++ b/src/pages/project/index.jsx @@ -5,6 +5,7 @@ import styles from './index.module.scss'; import Avator from '@root/components/Avator'; import Welcome from './components/welcome'; import { fetchProjectList } from './service'; +import Page from '@root/components/Page'; export default function ProjectListView() { const [projectList, setProjectList] = useState([]); @@ -20,31 +21,33 @@ export default function ProjectListView() { const dataList = await fetchProjectList(); setProjectList(dataList); }, []); - + useEffect(() => { fetchList(); }, [fetchList]) return ( - - - - - - - 我的项目 - - { - projectList.map(project => ( - - - - {project.projName} + + + + + + + + 我的项目 + + { + projectList.map(project => ( + + + + {project.projName} + - - )) - } - + )) + } + + ) } diff --git a/src/pages/project/index.module.scss b/src/pages/project/index.module.scss index 5254cb7..b124a14 100644 --- a/src/pages/project/index.module.scss +++ b/src/pages/project/index.module.scss @@ -1,10 +1,15 @@ +.page { + background-color: #f6f6f6; +} .project { $commonPadding: 24px * 2; - height: 100vh; - background-color: #f6f6f6; + height: 100%; .wrapPadding { padding: 0 $commonPadding; } + .mt10 { + margin-top: 20px; + } .avator { width: 84px; height: 84px;