From 41a6b194857b3dc9c994ae9e029fb04ca5c14116 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 10 Feb 2023 09:44:32 +0800 Subject: [PATCH] =?UTF-8?q?example=20=E4=B8=BB=E9=A2=98=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=B3=BB=E7=BB=9F=E6=8C=82=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/example/components/Nav.js | 31 +++++++++++++++++-------------- themes/example/config_empty.js | 6 +++++- 2 files changed, 22 insertions(+), 15 deletions(-) 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 ( -