Browse Source

搜索值trim

zhangxc 5 năm trước cách đây
mục cha
commit
821dbc0535
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  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