Browse Source

全局搜索优化

Hwf 6 months ago
parent
commit
df3b878a9f
1 changed files with 10 additions and 6 deletions
  1. 10 6
      src/views/globalMap/LeftMenu.vue

+ 10 - 6
src/views/globalMap/LeftMenu.vue

@@ -34,7 +34,7 @@
                 v-for="(item, index) in searchState.layerList"
                 :key="index"
                 class="list-item"
-                style="margin-top: 5px"
+                style="margin-top: 20px"
                 @click="selectSearchMarker(item)"
               >
                 <div class="tag">{{ item.dict_label }}</div>
@@ -57,7 +57,7 @@
                 v-for="(item, index) in searchState.videoList"
                 :key="index"
                 class="list-item2"
-                style="margin-top: 5px"
+                style="margin-top: 20px"
               >
                 <div class="text1" :title="item.name" @click="handleShowDialog(item)">{{ item.name }}</div>
                 <div class="tags">
@@ -137,6 +137,7 @@
 <script lang="ts" setup>
 import { getPointInfoComprehensiveSearch } from '@/api/globalMap';
 import { listMenu } from '@/api/system/menu';
+import { deepClone } from '@/utils';
 
 const emits = defineEmits(['switchMap', 'clickMenu', 'selectSearchMarker']);
 const getPlaceSearch = inject('getPlaceSearch');
@@ -397,11 +398,14 @@ defineExpose({ setMenuChange });
           align-items: center;
         }
         .text1 {
-          margin-left: 5px;
+          margin-left: 15px;
           font-size: 38px;
-          //overflow: hidden;
-          //text-overflow: ellipsis;
-          //white-space: nowrap;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: normal; /* 或者使用 nowrap,取决于你的布局需求 */
         }
       }
       .list-item2 {