diff --git a/blog.config.js b/blog.config.js index 43231e3c..d2af5472 100644 --- a/blog.config.js +++ b/blog.config.js @@ -10,7 +10,7 @@ const BLOG = { SINCE: 2021, // e.g if leave this empty, current year will be used. APPEARANCE: process.env.NEXT_PUBLIC_APPEARANCE || 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 - CUSTOM_MENU: process.env.NEXT_PUBLIC_CUSTOM_MENU || false, // 支持Menu 类型,从3.12.0版本起,各主题将逐步支持灵活的二级菜单配置,替代了原来的Page类型,此配置是试验功能、默认关闭。 + CUSTOM_MENU: process.env.NEXT_PUBLIC_CUSTOM_MENU || true, // 支持Menu 类型,从3.12.0版本起,各主题将逐步支持灵活的二级菜单配置,替代了原来的Page类型,此配置是试验功能、默认关闭。 AUTHOR: process.env.NEXT_PUBLIC_AUTHOR || 'NotionNext', // 您的昵称 例如 tangly1024 BIO: process.env.NEXT_PUBLIC_BIO || '一个普通的干饭人🍚', // 作者简介 diff --git a/themes/fukasawa/components/MenuItemDrop.js b/themes/fukasawa/components/MenuItemDrop.js index 3d5f5d3d..db0c4123 100644 --- a/themes/fukasawa/components/MenuItemDrop.js +++ b/themes/fukasawa/components/MenuItemDrop.js @@ -23,11 +23,13 @@ export const MenuItemDrop = ({ link }) => { {/* 子菜单 */} {hasSubMenu && } diff --git a/themes/medium/components/MenuItemDrop.js b/themes/medium/components/MenuItemDrop.js index 443a9682..e9d1b9f3 100644 --- a/themes/medium/components/MenuItemDrop.js +++ b/themes/medium/components/MenuItemDrop.js @@ -17,9 +17,9 @@ export const MenuItemDrop = ({ link }) => { return
  • changeShow(true)} onMouseOut={() => changeShow(false)} > {hasSubMenu && -
    -
    +
    {link?.icon && } {link?.name} {hasSubMenu && }
    @@ -27,9 +27,9 @@ export const MenuItemDrop = ({ link }) => { } {!hasSubMenu && -
    - + {link?.icon && } {link?.name}
    diff --git a/themes/next/components/MenuItemDrop.js b/themes/next/components/MenuItemDrop.js index 15067029..2ebb9876 100644 --- a/themes/next/components/MenuItemDrop.js +++ b/themes/next/components/MenuItemDrop.js @@ -23,13 +23,16 @@ export const MenuItemDrop = ({ link }) => { {/* 子菜单 */} {hasSubMenu &&
      - {link.subMenus.map(sLink => { - return
    • - {sLink.icon && } -
      {sLink.name}
      - {sLink.slot} + {link?.subMenus?.map(sLink => { + return
    • + + {sLink.icon && } +
      {sLink.name}
      + {sLink.slot} +
    • - })}
    } + })} + }
  • }