소스 검색

搜索关键词大小写

visuddhinanda 2 년 전
부모
커밋
c86ead1f12
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  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;
                 let weight = 0;
                 const wordBegin = item.word
                 const wordBegin = item.word
                   .toLocaleLowerCase()
                   .toLocaleLowerCase()
-                  .indexOf(keyWord);
+                  .indexOf(keyWord.toLocaleLowerCase());
                 if (wordBegin >= 0) {
                 if (wordBegin >= 0) {
                   weight += (1 / (wordBegin + 1)) * 1000;
                   weight += (1 / (wordBegin + 1)) * 1000;
                   const wordRemain =
                   const wordRemain =