Просмотр исходного кода

:bug: 显示协作者数量错

visuddhinanda 2 лет назад
Родитель
Сommit
444d663c1b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dashboard/src/components/dict/Community.tsx

+ 2 - 2
dashboard/src/components/dict/Community.tsx

@@ -148,7 +148,7 @@ const CommunityWidget = ({ word }: IWidget) => {
     );
   };
   const items: MenuProps["items"] = wordData?.editor
-    .filter((value, index) => index > mainCollaboratorNum)
+    .filter((value, index) => index >= mainCollaboratorNum)
     .map((item, id) => {
       return {
         key: id,
@@ -247,7 +247,7 @@ const CommunityWidget = ({ word }: IWidget) => {
         <Space>
           {"贡献者:"}
           {wordData?.editor
-            .filter((value, index) => index <= mainCollaboratorNum)
+            .filter((value, index) => index < mainCollaboratorNum)
             .map((item, id) => {
               return collaboratorRender(item.value.nickName, id, item.score);
             })}