task-252(admin.html观感对齐): 菜单管理列表列对齐(ID/菜单类型/上级菜单/创建时间)+ 类型中文映射

This commit is contained in:
2026-09-05 21:18:59 +08:00
parent 07fda4cf22
commit 8b4955d9b5
3 changed files with 105 additions and 5 deletions
@@ -14,9 +14,15 @@ export interface MenuManageNode {
menuType: string
routePath: string
sortOrder: number
createdAt?: string
children?: MenuManageNode[]
}
/** 菜单类型展示文案(对齐 admin 菜单类型语义)。 */
export function menuTypeLabel(type: string | null | undefined): string {
return (type || '').toLowerCase() === 'app' ? '应用菜单' : '后台菜单'
}
export interface MenuManageForm {
name: string
columnKey: string
@@ -75,6 +81,8 @@ export function parseMenuManageItem(raw: unknown): MenuManageNode | null {
}
const rootColumnKey = text(record.root_column_key)
if (rootColumnKey) node.rootColumnKey = rootColumnKey
const createdAt = text(record.created_at)
if (createdAt) node.createdAt = createdAt
return node
}