/** * 角色相关工具函数 */ /** * 格式化角色状态 */ export declare function formatRoleStatus(status: number): { text: string; type: "success" | "danger" | "info" | "warning"; }; /** * 格式化日期时间 */ export declare function formatDateTime(dateTime: string | number | null | undefined): string; /** * 将平铺数组构建成树形结构 * @param flatArray 平铺数组 * @param options 配置选项 * @returns 树形结构数组 */ export declare function buildTreeFromFlatArray(flatArray: any[], options?: { idKey?: string; parentIdKey?: string; childrenKey?: string; rootParentId?: string | number | null; }): any[]; /** * 转换菜单树为 Element Plus Tree 组件格式 * @param menuTree 菜单树(可以是平铺数组或树形结构) * @param isFlatArray 是否为平铺数组,默认 false(树形结构) * @returns Element Plus Tree 格式的树形结构 */ export declare function transformMenuTreeForElTree(menuTree: any[], isFlatArray?: boolean): any[];