From 72fd6cbea51457ebf411ef12b9de161019d1803b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 27 十二月 2022 14:03:35 +0800
Subject: [PATCH] 1.点击按钮全屏切换2.新增采购订单菜单

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

diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue
index 20a42aa..b93df7e 100644
--- a/src/components/HeaderSearch/index.vue
+++ b/src/components/HeaderSearch/index.vue
@@ -1,6 +1,6 @@
 <template>
   <div :class="{'show':show}" class="header-search">
-    <svg-icon class-name="search-icon" icon-class="search" style="color:#A7A7A7;" @click.stop="click" />
+    <svg-icon class-name="search-icon" icon-class="search" style="color:#A7A7A7;" @click.stop="click"/>
     <el-select
       ref="headerSearchSelect"
       v-model="search"
@@ -13,7 +13,8 @@
       @change="change"
     >
 
-      <el-option v-for="item in options" :key="item.path" :value="item" :label="item.item.title.join('>')" />
+      <el-option v-show="item.item.title.length>1" v-for="item in options" :key="item.path" :value="item"
+                 :label="item.item.title.join('>')"/>
     </el-select>
   </div>
 </template>
@@ -57,8 +58,6 @@
   },
   mounted() {
     this.searchPool = this.generateRoutes(this.routes)
-
-    console.log(this.searchPool)
   },
   methods: {
     click() {
@@ -73,7 +72,6 @@
       this.show = false
     },
     change(val) {
-      console.log(val, 1)
       this.$router.push(val.item.path)
       this.search = ''
       this.options = []
@@ -101,12 +99,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 +130,6 @@
           }
         }
       }
-      // console.log(res, 2)
       return res
     },
     querySearch(query) {
@@ -155,7 +153,7 @@
     vertical-align: middle;
   }
 
-  .svg-icon:hover{
+  .svg-icon:hover {
     color: #42b983 !important;
   }
 

--
Gitblit v1.9.3