feat(header): add showBaseHeader state and conditional rendering in BaseHeader component

This commit is contained in:
2026-02-26 04:02:59 +08:00
parent bdac089a85
commit cf3fe611eb
4 changed files with 60 additions and 52 deletions

View File

@@ -35,6 +35,8 @@ export type LayoutStore = {
setLoginPageConfig: (config: Partial<LayoutStore['loginPageConfig']>) => void;
links: HeaderLink[];
setLinks: (links: HeaderLink[]) => void;
showBaseHeader: boolean;
setShowBaseHeader: (showBaseHeader: boolean) => void;
};
type HeaderLink = {
title?: string;
@@ -103,4 +105,6 @@ export const useLayoutStore = create<LayoutStore>((set, get) => ({
})),
links: [{ title: '', href: '/', key: 'home' }],
setLinks: (links) => set({ links }),
showBaseHeader: true,
setShowBaseHeader: (showBaseHeader) => set({ showBaseHeader }),
}));