From 1bca863025b4655e772dd3887adda2fbb5ef5a63 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 1 Mar 2022 13:02:41 +0800 Subject: [PATCH] =?UTF-8?q?HEXO=E4=B8=BB=E9=A2=98=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=A0=87=E7=AD=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/Hexo/LayoutCategoryIndex.js | 6 +++--- themes/Hexo/components/CategoryGroup.js | 8 ++++---- themes/index.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/themes/Hexo/LayoutCategoryIndex.js b/themes/Hexo/LayoutCategoryIndex.js index 5c6de632..1eadfc7d 100644 --- a/themes/Hexo/LayoutCategoryIndex.js +++ b/themes/Hexo/LayoutCategoryIndex.js @@ -20,16 +20,16 @@ export const LayoutCategoryIndex = props => { {locale.COMMON.CATEGORY}:
- {Object.keys(categories).map(category => { + {categories.map(category => { return ( - +
- {category}({categories[category]}) + {category.name}({category.count})
) diff --git a/themes/Hexo/components/CategoryGroup.js b/themes/Hexo/components/CategoryGroup.js index 69865b56..a14e15d9 100644 --- a/themes/Hexo/components/CategoryGroup.js +++ b/themes/Hexo/components/CategoryGroup.js @@ -7,14 +7,14 @@ const CategoryGroup = ({ currentCategory, categories }) => { } return <>
- {Object.keys(categories).map(category => { - const selected = currentCategory === category - return + {categories.map(category => { + const selected = currentCategory === category.name + return -
{category}({categories[category]})
+
{category.name}({category.count})
})} diff --git a/themes/index.js b/themes/index.js index 13b192e4..5acc65dd 100644 --- a/themes/index.js +++ b/themes/index.js @@ -4,6 +4,6 @@ // export * from './Empty' // 空主题 // export * from './NEXT' -export * from './Fukasawa' -// export * from './Hexo' +// export * from './Fukasawa' +export * from './Hexo' // export * from './Medium'