diff --git a/themes/nav/components/Footer.js b/themes/nav/components/Footer.js index 68750316..16215379 100755 --- a/themes/nav/components/Footer.js +++ b/themes/nav/components/Footer.js @@ -17,7 +17,7 @@ const Footer = ({ siteInfo }) => { © {`${copyrightDate}`} -
Powered By NotionNext
+
Powered By NotionNext {siteConfig('VERSION')}
{siteConfig('BEI_AN') && <> {siteConfig('BEI_AN')}
} diff --git a/themes/nav/components/MenuItem.js b/themes/nav/components/MenuItem.js index f1b1acc1..848bef9b 100644 --- a/themes/nav/components/MenuItem.js +++ b/themes/nav/components/MenuItem.js @@ -21,8 +21,8 @@ export const MenuItem = ({ link }) => { } // #号加标题 快速跳转到指定锚点 - const url = link?.to && link?.to !=='#' ? link.to : ('#' + link.name) - console.log(link,url , '#' + link.name) + const isAnchor = link?.to === '#' + const url = isAnchor ? ('#' + link.name) : link.to return <> {/* 菜单 */} @@ -33,7 +33,7 @@ export const MenuItem = ({ link }) => { {link?.subMenus ? (<> - {link?.icon && }{link?.title} + {link?.title}
@@ -41,23 +41,25 @@ export const MenuItem = ({ link }) => { ) : ( - {link?.icon && }{link?.title} + {link?.title} ) }
- {/* 菜单按钮 */} + {/* 子菜单按钮 */} {link?.subMenus && ( { link?.subMenus?.map((sLink, index) => { - // #号加标题 快速跳转到指定锚点 - const sUrl = sLink?.to && sLink?.to.length !=='#' ? sLink.to : ('#' + sLink.name) - return
+ // #号加标题 快速跳转到指定锚点 + const sIsAnchor = sLink?.to === '#' + const sUrl = sIsAnchor ? sLink.to : ('#' + sLink.name) + return
- {sLink.title} + + {sLink.title}
})