Explorar o código

搜索关键词大小写

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
c86ead1f12
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dashboard/src/components/term/GrammarBook.tsx

+ 1 - 1
dashboard/src/components/term/GrammarBook.tsx

@@ -129,7 +129,7 @@ const GrammarBookWidget = () => {
                 let weight = 0;
                 const wordBegin = item.word
                   .toLocaleLowerCase()
-                  .indexOf(keyWord);
+                  .indexOf(keyWord.toLocaleLowerCase());
                 if (wordBegin >= 0) {
                   weight += (1 / (wordBegin + 1)) * 1000;
                   const wordRemain =