Ver Fonte

修改测试BUG

shenjj há 7 anos atrás
pai
commit
dbc75bcec6
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      components/main/Search.vue

+ 3 - 3
components/main/Search.vue

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