瀏覽代碼

修改home样式

Renxy 1 年之前
父節點
當前提交
51814e4567
共有 3 個文件被更改,包括 10 次插入6 次删除
  1. 0 1
      src/pages/Home/index.less
  2. 5 2
      src/pages/Menu/index.js
  3. 5 3
      src/pages/Menu/index.less

+ 0 - 1
src/pages/Home/index.less

@@ -6,7 +6,6 @@
   width: 100%;
   padding-bottom: 40px;
   color: #3b3b3b;
-  background-color: #f5a623;
 }
 .left {
   text-align: center;

+ 5 - 2
src/pages/Menu/index.js

@@ -64,13 +64,16 @@ function Menu() {
   return (
     <div className={styles.main}>
       <div className={styles.menu}>
-        {menuList.map((item) => (
+        {menuList.map((item, idx) => (
           <div
             key={item.name}
             className={styles.text}
             onClick={() => handleClick(item)}
           >
-            <img className={styles.icon} src={item.icon} />
+            <img
+              className={idx ? styles.iconHome : styles.icon}
+              src={item.icon}
+            />
             {item.name}
           </div>
         ))}

+ 5 - 3
src/pages/Menu/index.less

@@ -12,8 +12,9 @@
   box-shadow: 0.03rem 0.49rem 1rem 0rem rgba(60, 93, 133, 0.72);
 }
 .menu {
+  margin-top: 0.2rem;
   width: 100%;
-  height: calc(100vh - 1.6rem);
+  // height: calc(100vh - 1.6rem);
   display: flex;
   flex-direction: column;
   overflow-y: auto;
@@ -36,8 +37,9 @@
   height: 0.7rem;
   display: block;
 }
-icon:first-child {
-  margin-top: 0;
+.iconHome {
+  .icon;
+  margin: 0.24rem auto 0.1rem;
 }
 .arrowCon {
   width: 100%;