From 073a05968f25eaae516b9da047275067b4bc5713 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 10 Apr 2022 13:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=93=BE=E6=96=B0=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/MenuButtonGroupTop.js | 2 +- themes/hexo/components/MenuGroupCard.js | 2 +- themes/hexo/components/MenuList.js | 36 ++++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index 0d21721f..c8d087fc 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -22,7 +22,7 @@ const MenuButtonGroupTop = (props) => { {links.map(link => { if (link.show) { return - +
{link.name}
diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 3c8fee64..a36aede5 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -20,7 +20,7 @@ const MenuGroupCard = (props) => { {links.map(link => { if (link.show) { return -
+
{link.name}
{link.slot}
diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index bf8ac23b..c8103624 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -22,23 +22,23 @@ const MenuList = (props) => { } return
+ {links.map(link => { + if (link && link.show) { + const selected = (router.pathname === link.to) || (router.asPath === link.to) + return + +
+ +
{link.name}
+
+ {link.slot} +
+ + } else { + return null + } + })} + } export default MenuList