Selaa lähdekoodia

subTitle可以没有

lifanagju_citu 10 kuukautta sitten
vanhempi
commit
81819969fc

+ 12 - 5
src/views/entrances/navBar/components/defineListPage.vue

@@ -1,20 +1,23 @@
 <template>
   <m-menu :btnTitle="title">
     <v-card elevation="3" style="padding: 40px 60px; width: 100%; overflow-y: visible; overflow-x: auto;">
-      <div class="d-flex">
+      <div v-if="list?.length" class="d-flex">
         <div v-for="(item, i) in list" :key="'product'+i" :style="{'margin-left': i ? ml : 'auto'}">
           <div style="font-size: 20px; color: var(--v-primary-lighten2)" class="mb-5">{{ item.title }}</div>
-          <v-divider class="mb-3" style="color: var(--v-primary-lighten2)"></v-divider>
-          <div v-for="(arr, j) in item.appList" :key="'productApp'+j" class="d-flex">
+          <v-divider class="mb-6" style="color: var(--v-primary-lighten2)"></v-divider>
+          <div v-for="(arr, j) in item?.appList" :key="'productApp'+j" class="d-flex">
             <div
               v-for="(val, k) in arr" :key="'productAppArr'+k"
               :class="{'ml-5': k}"
               :style="{width: val.width ? val.width : !k ? width : 'auto'}"
-              class="d-flex cursor-pointer mb-5"
+              class="d-flex cursor-pointer"
               @click="emits('emitClick', val)"
             >
               <span class="mr-2" style="font-size: 30px;line-height: 22px;color: var(--v-primary-lighten2);">·</span>
-              <div style="font-size: 17px; font-weight: 500;">{{ val.title }}</div>
+              <div>
+                <div style="font-size: 16px; font-weight: 500;">{{ val.title }}</div>
+                <div style="font-size: 14px;" class="subTitle mb-5">{{ val.subTitle }}</div>
+              </div>
             </div>
           </div>
         </div>
@@ -48,8 +51,12 @@ defineProps({
 </script>
 <style lang="scss" scoped>
 .cursor-pointer {
+  .subTitle { color: #999; }
   &:hover {
     color: var(--v-primary-base);
+    .subTitle {
+      color: #666;
+    }
   }
 }
 </style>

+ 0 - 62
src/views/entrances/navBar/components/defineListPage2.vue

@@ -1,62 +0,0 @@
-<template>
-  <m-menu :btnTitle="title">
-    <v-card elevation="3" style="padding: 40px 60px; width: 100%; overflow-y: visible; overflow-x: auto;">
-      <div class="d-flex">
-        <div v-for="(item, i) in list" :key="'product'+i" :style="{'margin-left': i ? ml : 'auto'}">
-          <div style="font-size: 20px; color: var(--v-primary-lighten2)" class="mb-5">{{ item.title }}</div>
-          <v-divider class="mb-6" style="color: var(--v-primary-lighten2)"></v-divider>
-          <div v-for="(arr, j) in item.appList" :key="'productApp'+j" class="d-flex">
-            <div
-              v-for="(val, k) in arr" :key="'productAppArr'+k"
-              :class="{'ml-5': k}"
-              :style="{width: val.width ? val.width : !k ? width : 'auto'}"
-              class="d-flex cursor-pointer"
-              @click="emits('emitClick', val)"
-            >
-              <span class="mr-2" style="font-size: 30px;line-height: 22px;color: var(--v-primary-lighten2);">·</span>
-              <div>
-                <div style="font-size: 16px; font-weight: 500;">{{ val.title }}</div>
-                <div style="font-size: 14px;" class="subTitle mb-5">{{ val.subTitle }}</div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </v-card>
-  </m-menu>
-</template>
-
-<script setup>
-import MMenu from './commonMenuStyle.vue'
-defineOptions({name: 'entrances-defineListPage2'})
-const emits = defineEmits(['emitClick'])
-defineProps({
-  list: {
-    type: Array,
-    default: () => []
-  },
-  title: {
-    type: String,
-    default: 'title'
-  },
-  width: {
-    type: String,
-    default: '160px'
-  },
-  ml: {
-    type: String,
-    default: '150px'
-  }
-})
-</script>
-<style lang="scss" scoped>
-.cursor-pointer {
-  .subTitle { color: #999; }
-  &:hover {
-    color: var(--v-primary-base);
-    .subTitle {
-      color: #666;
-    }
-  }
-}
-</style>

+ 1 - 1
src/views/entrances/navBar/components/serviceSupport.vue

@@ -3,7 +3,7 @@
 </template>
 
 <script setup>
-import defineListPage from './defineListPage2.vue'
+import defineListPage from './defineListPage.vue'
 defineOptions({name: 'navBar-serviceSupport'})
 const emits = defineEmits(['emitClick'])
 

+ 1 - 1
src/views/entrances/navBar/components/solution.vue

@@ -3,7 +3,7 @@
 </template>
 
 <script setup>
-import defineListPage from './defineListPage2.vue'
+import defineListPage from './defineListPage.vue'
 defineOptions({name: 'navBar-solution'})
 const emits = defineEmits(['emitClick'])