diff --git a/themes/example/components/Nav.js b/themes/example/components/Nav.js index edb99ac0..701e902c 100644 --- a/themes/example/components/Nav.js +++ b/themes/example/components/Nav.js @@ -1,5 +1,6 @@ import { useGlobal } from '@/lib/global' import Link from 'next/link' +import CONFIG_EMPTY from '../config_empty' /** * 菜单导航 @@ -10,10 +11,10 @@ export const Nav = (props) => { const { customNav } = props const { locale } = useGlobal() let links = [ - { icon: 'fas fa-search', name: locale.NAV.SEARCH, to: '/search' }, - { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive' }, - { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category' }, - { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag' } + { icon: 'fas fa-search', name: locale.NAV.SEARCH, to: '/search', show: CONFIG_EMPTY.MENU_SEARCH }, + { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', show: CONFIG_EMPTY.MENU_ARCHIVE }, + { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_EMPTY.MENU_CATEGORY }, + { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_EMPTY.MENU_TAG } ] if (customNav) { @@ -21,18 +22,20 @@ export const Nav = (props) => { } return ( -