From bc5a6b89497cae8fa44d83fb73f02d4407edd172 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 25 Sep 2024 17:41:25 +0800 Subject: [PATCH] =?UTF-8?q?gitbook=E5=BE=AE=E8=B0=83=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/gitbook/components/Header.js | 4 +- themes/gitbook/components/LogoBar.js | 2 +- themes/gitbook/components/MenuItemDrop.js | 74 +++++++++++------------ themes/gitbook/index.js | 2 +- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/themes/gitbook/components/Header.js b/themes/gitbook/components/Header.js index 195921cd..f023d032 100644 --- a/themes/gitbook/components/Header.js +++ b/themes/gitbook/components/Header.js @@ -65,8 +65,8 @@ export default function Header(props) { return (
{/* PC端菜单 */} -
-
+
+
{/* 左侧*/}
diff --git a/themes/gitbook/components/LogoBar.js b/themes/gitbook/components/LogoBar.js index 8c3b723e..b3f96cdf 100644 --- a/themes/gitbook/components/LogoBar.js +++ b/themes/gitbook/components/LogoBar.js @@ -14,7 +14,7 @@ export default function LogoBar(props) {
+ className='flex text-lg font-bold md:text-2xl dark:text-gray-200'> { const selected = router.pathname === link.href || router.asPath === link.href return (
  • changeShow(true)} onMouseOut={() => changeShow(false)}> - {hasSubMenu && ( -
    -
    - {link?.icon && } {link?.name} - {hasSubMenu && ( - - )} -
    -
    - )} - {!hasSubMenu && (
    {
    )} - {/* 子菜单 */} + {/* 包含子菜单 */} {hasSubMenu && ( -
      - {link?.subMenus?.map((sLink, index) => { - return ( -
    • - - - {link?.icon &&   } - {sLink.title} - - -
    • - ) - })} -
    + <> +
    +
    + {link?.icon && } {link?.name} + {hasSubMenu && ( + + )} +
    +
    + {/* 下拉菜单内容 */} +
      + {link?.subMenus?.map((sLink, index) => { + return ( +
    • + + + {link?.icon &&   } + {sLink.title} + + +
    • + ) + })} +
    + )}
  • ) diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js index 2fbd5265..415ad701 100644 --- a/themes/gitbook/index.js +++ b/themes/gitbook/index.js @@ -149,7 +149,7 @@ const LayoutBase = props => {
    {/* 导航 */} -
    +
    {/* 嵌入 */} {slotLeft}