/** * 菜单项类型定义 */ export interface MenuItem { key: string; path: string; level: number; title: string; icon: string; url?: string; isActive: boolean; children?: MenuItem[]; } /** * 更新菜单项的 active 状态 * * @param menuArr * @param currPath */ export declare const updateActiveState: (menuArr: MenuItem[], currPath: string) => MenuItem[]; /** * 过滤菜单项 * 如果传入的是父级 key → 保留整个模块。 * 如果传入的是子级 key → 保留父级及这些子项。 * * @param menuArr * @param targetKeys */ export declare const filterMenuByKey: (menuArr: MenuItem[], targetKeys: string[]) => MenuItem[]; /** * 排除菜单项 * 如果传入的是父级 key → 直接从结果中去除整个模块。 * 如果传入的是子级 key → 去掉子项,但如果父级还有其他子项,保留父级;否则去掉父级。 * * @param menuArr * @param excludeKeys */ export declare const excludeMenuByKey: (menuArr: MenuItem[], excludeKeys: string[]) => MenuItem[]; /** * 辅助函数:解析文件名 * * @param contentDisposition */ export declare const getFilenameFromHeader: (contentDisposition: string) => string | null;