Browse Source

搜索值trim

zhangxc 5 years ago
parent
commit
821dbc0535
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/js/index.js
  2. 1 1
      src/js/knowledgeTree.js

+ 1 - 1
src/js/index.js

@@ -92,7 +92,7 @@ $('.radioItem').click(function(e){
 //搜索
 $('#searchBtn').click(function(e){
     e.stopPropagation()
-    const val = $('#searchInp').val()
+    const val = $('#searchInp').val().trim()
     if(val){
         const clientHei = $(window).height()
         const contentHei = clientHei - 80

+ 1 - 1
src/js/knowledgeTree.js

@@ -89,7 +89,7 @@ $('.radioItem').click(function(e){
 //搜索
 $('#searchBtn').click(function(e){
     e.stopPropagation()
-    const val = $('#searchInp').val()
+    const val = $('#searchInp').val().trim()
     if(val){
         const clientHei = $(window).height()
         const contentHei = clientHei - 80