折叠菜单配置化

This commit is contained in:
tangly1024.com
2023-11-03 17:43:07 +08:00
parent f145d8b28c
commit 8425de5bad
28 changed files with 123 additions and 170 deletions

View File

@@ -1,6 +1,5 @@
import React from 'react'
import { useGlobal } from '@/lib/global'
import BLOG from '@/blog.config'
import { siteConfig } from '@/lib/config'
import { MenuItemCollapse } from './MenuItemCollapse'
import CONFIG from '../config'
@@ -18,7 +17,7 @@ export const MenuListSide = (props) => {
if (customNav) {
links = customNav.concat(links)
}
for (let i = 0; i < links.length; i++) {
if (links[i].id !== i) {
links[i].id = i
@@ -26,7 +25,7 @@ export const MenuListSide = (props) => {
}
// 如果 开启自定义菜单则覆盖Page生成的菜单
if (BLOG.CUSTOM_MENU) {
if (siteConfig('CUSTOM_MENU')) {
links = customMenu
}