Browse Source

update menu

scorpio 2 years ago
parent
commit
618b5bc4e5
1 changed files with 43 additions and 21 deletions
  1. 43 21
      src/layout/left.vue

+ 43 - 21
src/layout/left.vue

@@ -2,37 +2,37 @@
   <div class="box-shadow-blue full-height" style="background-color: #f4f3ee">
     <div class="padding mt-20">
       <div class="flex flex-center mt-10" style="margin-bottom: 60px">
-        <img src="@/assets/svg/logo.svg"/>
+        <img src="@/assets/svg/logo.svg" />
       </div>
     </div>
     <div>
       <div
-          class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width"
+        class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width"
       >
         <div
-            v-for="(item, index) in data"
-            :key="item.name"
-            class="full-width flex flex-col flex-center pointer"
+          v-for="(item, index) in data"
+          :key="item.name"
+          class="full-width flex flex-col flex-center pointer"
         >
           <div
-              class="full-width flex flex-center padding"
-              style="z-index: 2"
-              :class="active === index ? 'item-s' : 'item'"
-              @click="navClick(item, index)"
+            class="full-width flex flex-center padding"
+            style="z-index: 2"
+            :class="active === index ? 'item-s' : 'item'"
+            @click="navClick(item, index)"
           >
-            <img :src="item.img"/>
+            <img :src="item.img" />
             <span class="flex-child-average">{{ item.name }}</span>
           </div>
           <div
-              v-if="item.children && item.children.length > 0 && active === index"
-              class="flex flex-col flex-center item-sub padding"
+            v-if="item.children && item.children.length > 0 && active === index"
+            class="flex flex-col flex-center item-sub padding"
           >
             <div
-                v-for="(sub, subIndex) in item.children"
-                :key="item"
-                class="padding full-width flex flex-center"
-                :class="subIndex === subActive ? 'item-sub-active' : ''"
-                @click="subClick(sub, subIndex)"
+              v-for="(sub, subIndex) in item.children"
+              :key="item.id"
+              class="padding full-width flex flex-center"
+              :class="subIndex === subActive ? 'item-sub-active' : ''"
+              @click="subClick(sub, subIndex)"
             >
               <div class="mr-10 main-color">·</div>
               <span>{{ sub.name }}</span>
@@ -52,14 +52,36 @@ export default {
       subActive: 0,
       data: [
         {
-          name: '年度投资管理',
+          name: '投资管理',
           img: new URL('../assets/svg/icon4.svg', import.meta.url).href,
-          path: '/'
+          children: [
+            {
+              name: '项目投资管理',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/'
+            },
+            {
+              name: '固定资产投资管理',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/'
+            }
+          ]
         },
         {
           name: '项 目 库',
           img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
-          path: '/home'
+          children: [
+            {
+              name: '项目管理',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/home'
+            },
+            {
+              name: '固定资产管理',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/home'
+            }
+          ]
         },
         // {
         //   name: '任务列表',
@@ -158,7 +180,7 @@ export default {
 }
 
 .item-sub {
-  width: 150px;
+  width: 160px;
   border-bottom-left-radius: 14px;
   border-bottom-right-radius: 14px;
   margin-top: -10px;