Browse Source

修改测试BUG

shenjj 7 years ago
parent
commit
dbc75bcec6
1 changed files with 3 additions and 3 deletions
  1. 3 3
      components/main/Search.vue

+ 3 - 3
components/main/Search.vue

@@ -270,7 +270,7 @@
         this.associate.show = true
         this.$store.dispatch('searchKeywords', { keyword: this.keyword, type: this.newSearchType })
       },
-      onSearch () {
+      onSearch (str) {
         document.getElementsByClassName('search-input')[0].blur()
         if (this.keyword) {
           this.associate.show = false
@@ -285,7 +285,7 @@
             }
           }
         } else {
-          this.$message.info('请输入关键字')
+          if (!str) { this.$message.info('请输入关键字') }
         }
       },
       onAssociateClick (word) {
@@ -300,7 +300,7 @@
       },
       setNewSearchType (type) {
         this.newSearchType = type
-        this.onSearch()
+        this.onSearch('fromLabel')
       }
     },
     created () {