Sfoglia il codice sorgente

搜索关键词大小写

visuddhinanda 2 anni fa
parent
commit
c86ead1f12
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 =