diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 93859c3..bd508bb 100755 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -98,7 +98,7 @@ const Header = () => { {/* logo */} - {isDark ? Logo : Logo} + {isDark ? Logo : Logo} - ) - )} + )} -
  • - - 🧩 探索 - - - - + {/* 渲染导航 */} + {one.type === 'nav' && ( +
  • + + {one.icon} {one.name} - - - -
  • + {/* 如果有子分类就显示下拉三角 */} + + + + + + + + + + )} + + ))} {/* 主题切换开关 */} diff --git a/src/types/app/cate.d.ts b/src/types/app/cate.d.ts index cd6fa65..02f8ca4 100755 --- a/src/types/app/cate.d.ts +++ b/src/types/app/cate.d.ts @@ -5,7 +5,7 @@ export interface Cate { url: string, icon: string, level: number, - type: string, + type: 'cate' | 'nav', order: number, children: Cate[] }