From c93c13d1cfe288d431109ae1eafd7a9fc6d58746 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 13 六月 2023 10:23:17 +0800
Subject: [PATCH] 1.递交

---
 src/components/HeaderSearch/index.vue |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue
index 20a42aa..5da888a 100644
--- a/src/components/HeaderSearch/index.vue
+++ b/src/components/HeaderSearch/index.vue
@@ -13,7 +13,13 @@
       @change="change"
     >
 
-      <el-option v-for="item in options" :key="item.path" :value="item" :label="item.item.title.join('>')" />
+      <el-option
+        v-for="item in options"
+        v-show="item.item.title.length>1"
+        :key="item.path"
+        :value="item"
+        :label="item.item.title.join('>')"
+      />
     </el-select>
   </div>
 </template>
@@ -57,8 +63,6 @@
   },
   mounted() {
     this.searchPool = this.generateRoutes(this.routes)
-
-    console.log(this.searchPool)
   },
   methods: {
     click() {
@@ -73,7 +77,6 @@
       this.show = false
     },
     change(val) {
-      console.log(val, 1)
       this.$router.push(val.item.path)
       this.search = ''
       this.options = []
@@ -101,12 +104,13 @@
     // Filter out the routes that can be displayed in the sidebar
     // And generate the internationalized title
     generateRoutes(routes, basePath = '/', prefixTitle = []) {
-      // console.log(routes, 1)
       let res = []
 
       for (const router of routes) {
         // skip hidden router
-        if (router.hidden) { continue }
+        if (router.hidden) {
+          continue
+        }
 
         const data = {
           path: path.resolve(basePath, router.path),
@@ -131,7 +135,6 @@
           }
         }
       }
-      // console.log(res, 2)
       return res
     },
     querySearch(query) {
@@ -155,8 +158,9 @@
     vertical-align: middle;
   }
 
-  .svg-icon:hover{
-    color: #42b983 !important;
+  .svg-icon:hover {
+    //color: #42b983 !important;
+    color: rgb(170, 170, 170) !important;
   }
 
   .header-search-select {

--
Gitblit v1.9.3