50 lines
804 B
Plaintext
50 lines
804 B
Plaintext
// 统一类型定义文件,避免重复定义冲突
|
|
|
|
export type UserInfo = {
|
|
nickname: string
|
|
role: string
|
|
}
|
|
|
|
export type TagItem = {
|
|
path: string
|
|
title: string
|
|
isAffix?: boolean
|
|
}
|
|
|
|
export type MenuChild = {
|
|
id: string
|
|
title: string
|
|
|
|
// ✅ 目录节点可以没有 path
|
|
path?: string | null
|
|
|
|
// ✅ 允许四级
|
|
children?: MenuChild[] | null
|
|
}
|
|
|
|
export type MenuGroup = {
|
|
id?: string | null
|
|
title: string
|
|
|
|
// ✅ 允许 group 自己也能当叶子直接跳转(可选)
|
|
path?: string | null
|
|
|
|
// ✅ children 允许缺省/为空
|
|
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
|
|
}
|