Files
medical-mall/layouts/admin/types.uts
2026-01-30 19:00:31 +08:00

47 lines
845 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 统一类型定义文件,避免重复定义冲突
export type UserInfo = {
nickname: string
role: string
}
export type TagItem = {
path: string
title: string
isAffix?: boolean
}
export type MenuChild = {
id: string
title: string
path: string
// ✅ 允许四级MenuChild 下还能继续 children
children?: MenuChild[] | null
}
export type MenuGroup = {
title: string
// ✅ 允许“叶子二级菜单”group 自己也可以有 path可选
path?: string | null
// ✅ 关键children 改成可选(否则你现在这种叶子 group 会直接报错)
children?: MenuChild[] | null
}
export type MenuItem = {
id: string
title: string
icon: string // 你的 svg 路径
path?: string
groups?: MenuGroup[]
}
export type TabItem = {
id: string
title: string
path: string
}