From 8ed540c39b207b3093550c250bd54124a306348b Mon Sep 17 00:00:00 2001 From: hackrobot Date: Tue, 19 Mar 2024 17:23:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9F=8E=E5=B8=82=E6=96=B9=E5=9D=97?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.jsx | 23 +++++++++-------------- src/pages/index/index.scss | 28 ++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index a313f1e..732cdc7 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -16,7 +16,6 @@ export default function Index() { // 用户基本信息 const [userInfo, setuserInfo] = useState({}); - useLoad(() => { console.log("Page loaded."); }); @@ -51,9 +50,17 @@ export default function Index() { { cityName: "上海", imagePath: shanghai }, { cityName: "广州", imagePath: guangzhou }, { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + ].map((item, index) => { return ( - + // 设置自动换行 + {/* 城市封面图片 */} - - {/* */} - ); }); diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index bddd3ca..3075388 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -1,6 +1,7 @@ .index { padding-left: 20px; padding-right: 20px; + background-color: aquamarine; .indexHeader { margin-top: 10px; @@ -21,25 +22,36 @@ .homeCards { display: flex; - flex-direction: column; + // flex-direction: column; + flex-direction: row; + flex-wrap: wrap; .homeCardItem { margin-top: 10px; - + width: 340px; + height: 250px; display: flex; flex-direction: row; - // background-color: aqua; - justify-content: space-between; - align-items: center; + background-color: aqua; + // justify-content: space-between; + // align-items: center; .homeCard { - width: 340px; - height: 250px; + width: 100%; + height: 100%; background-color: yellow; border-radius: 20px; + // margin-left:20px; } + + } + .homeCardDiv{ + width: 30px; + height: 100%; + background-color: blue; } - } + + } .tabbbarDiv { width: 100%; height: 140px;