From 69fbde8328ddc8ce35c1023b6af28f3c29694b4f Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 30 Jan 2024 18:45:39 +0800 Subject: [PATCH] little fix --- themes/heo/components/CategoryBar.js | 2 +- themes/nav/components/MenuItem.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/heo/components/CategoryBar.js b/themes/heo/components/CategoryBar.js index baadda2fee1..eccd9685621 100644 --- a/themes/heo/components/CategoryBar.js +++ b/themes/heo/components/CategoryBar.js @@ -32,7 +32,7 @@ export default function CategoryBar(props) { return
-
+
{categoryOptions?.map((c, index) => )}
diff --git a/themes/nav/components/MenuItem.js b/themes/nav/components/MenuItem.js index 83bc7461fbd..7470520e9c2 100644 --- a/themes/nav/components/MenuItem.js +++ b/themes/nav/components/MenuItem.js @@ -20,6 +20,9 @@ export const MenuItem = ({ link }) => { return null } + // #号加标题 快速跳转到指定锚点 + const url = link?.to && link?.to.length > 0 ? link.to : '#' + link?.title + return <> {/* 菜单 */}
{
) : ( - // link?.to - + {link?.icon && }{link?.title} )