瀏覽代碼

单词表取前八个

visuddhinanda 2 年之前
父節點
當前提交
d2d559b5d6
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      dashboard/src/components/dict/SearchVocabulary.tsx

+ 1 - 0
dashboard/src/components/dict/SearchVocabulary.tsx

@@ -115,6 +115,7 @@ const SearchVocabularyWidget = ({
             };
             };
           })
           })
           .sort((a, b) => b.weight - a.weight)
           .sort((a, b) => b.weight - a.weight)
+          .slice(0, 7)
           .map((item) => {
           .map((item) => {
             return renderItem(item.word, item.count, item.meaning);
             return renderItem(item.word, item.count, item.meaning);
           });
           });