李林森 7 years ago
parent
commit
d202f9ce5a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/view/nav.vue

+ 3 - 2
src/view/nav.vue

@@ -26,7 +26,7 @@
           </ul></li>
           </ul></li>
       </li>
       </li>
     </ul>
     </ul>
-    <ul if-else>
+    <ul v-if="searchKeyWork">
       <li v-for="(item,index) in reslouts" :key="index" >
       <li v-for="(item,index) in reslouts" :key="index" >
         <router-link :to="{name:item.name}" :class="{ current:path=='/'+item.name }">{{item.name}}<span class="chnn">{{item.chnName || '组件' }}</span></router-link>
         <router-link :to="{name:item.name}" :class="{ current:path=='/'+item.name }">{{item.name}}<span class="chnn">{{item.chnName || '组件' }}</span></router-link>
       </li>
       </li>
@@ -58,7 +58,8 @@ export default {
   },
   },
   methods: {
   methods: {
     clearSearch(){
     clearSearch(){
-      this.searchKeyWork ="";
+      this.searchKeyWork =null;
+      this.reslouts = [];
     }    
     }    
   },
   },
   watch: {
   watch: {